package CompilerFront;

// $ANTLR 3.4 Python.g 2012-12-30 22:05:07

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.tree.*;


/** Python 2.3.3 Grammar
 *
 *  Terence Parr and Loring Craymer
 *  February 2004
 *
 *  Converted to ANTLR v3 November 2005 by Terence Parr.
 *
 *  This grammar was derived automatically from the Python 2.3.3
 *  parser grammar to get a syntactically correct ANTLR grammar
 *  for Python.  Then Terence hand tweaked it to be semantically
 *  correct; i.e., removed lookahead issues etc...  It is LL(1)
 *  except for the (sometimes optional) trailing commas and semi-colons.
 *  It needs two symbols of lookahead in this case.
 *
 *  Starting with Loring's preliminary lexer for Python, I modified it
 *  to do my version of the whole nasty INDENT/DEDENT issue just so I
 *  could understand the problem better.  This grammar requires
 *  PythonTokenStream.java to work.  Also I used some rules from the
 *  semi-formal grammar on the web for Python (automatically
 *  translated to ANTLR format by an ANTLR grammar, naturally <grin>).
 *  The lexical rules for python are particularly nasty and it took me
 *  a long time to get it 'right'; i.e., think about it in the proper
 *  way.  Resist changing the lexer unless you've used ANTLR a lot. ;)
 *
 *  I (Terence) tested this by running it on the jython-2.1/Lib
 *  directory of 40k lines of Python.
 *
 *  REQUIRES ANTLR v3
 */
@SuppressWarnings({"all", "warnings", "unchecked"})
public class PythonParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALT_NOTEQUAL", "AMPER", "AMPEREQUAL", "ASSIGN", "BACKQUOTE", "BLOCK", "BRACKETED", "CIRCUMFLEX", "CIRCUMFLEXEQUAL", "CLASS_DEF", "COLON", "COMMA", "COMMENT", "COMPLEX", "COMPOUND_STATMENT", "CONTINUED_LINE", "DEDENT", "DIGITS", "DOT", "DOUBLESLASH", "DOUBLESLASHEQUAL", "DOUBLESTAR", "DOUBLESTAREQUAL", "EQUAL", "ESC", "EXCEPT_STATMENT", "EXPRESSION_STATMENT", "Exponent", "FINALLY_STATMENT", "FLOAT", "FOR_STATMENT", "FUNCTION_DEF", "GREATER", "GREATEREQUAL", "IF_STATMENT", "IMPORT_STATMENT", "INDENT", "INT", "LBRACK", "LCURLY", "LEADING_WS", "LEFTSHIFT", "LEFTSHIFTEQUAL", "LESS", "LESSEQUAL", "LONGINT", "LPAREN", "MINUS", "MINUSEQUAL", "NAME", "NEWLINE", "NOTEQUAL", "PARAMETERS", "PERCENT", "PERCENTEQUAL", "PLUS", "PLUSEQUAL", "RBRACK", "RCURLY", "RETURN_STATMENT", "RIGHTSHIFT", "RIGHTSHIFTEQUAL", "RPAREN", "SEMI", "SIMPLE_STATMENT", "SLASH", "SLASHEQUAL", "STAR", "STAREQUAL", "STATMENT", "STRING", "TESTLIST", "TILDE", "TRY_STATMENT", "TUPLE", "VARIABLE", "VBAR", "VBAREQUAL", "WHILE_STATMENT", "WS", "'and'", "'assert'", "'break'", "'class'", "'continue'", "'def'", "'del'", "'elif'", "'else'", "'except'", "'exec'", "'finally'", "'for'", "'from'", "'global'", "'if'", "'import'", "'in'", "'is'", "'lambda'", "'not'", "'or'", "'pass'", "'print'", "'raise'", "'return'", "'try'", "'while'", "'yield'"
    };

    public static final int EOF=-1;
    public static final int T__84=84;
    public static final int T__85=85;
    public static final int T__86=86;
    public static final int T__87=87;
    public static final int T__88=88;
    public static final int T__89=89;
    public static final int T__90=90;
    public static final int T__91=91;
    public static final int T__92=92;
    public static final int T__93=93;
    public static final int T__94=94;
    public static final int T__95=95;
    public static final int T__96=96;
    public static final int T__97=97;
    public static final int T__98=98;
    public static final int T__99=99;
    public static final int T__100=100;
    public static final int T__101=101;
    public static final int T__102=102;
    public static final int T__103=103;
    public static final int T__104=104;
    public static final int T__105=105;
    public static final int T__106=106;
    public static final int T__107=107;
    public static final int T__108=108;
    public static final int T__109=109;
    public static final int T__110=110;
    public static final int T__111=111;
    public static final int T__112=112;
    public static final int ALT_NOTEQUAL=4;
    public static final int AMPER=5;
    public static final int AMPEREQUAL=6;
    public static final int ASSIGN=7;
    public static final int BACKQUOTE=8;
    public static final int BLOCK=9;
    public static final int BRACKETED=10;
    public static final int CIRCUMFLEX=11;
    public static final int CIRCUMFLEXEQUAL=12;
    public static final int CLASS_DEF=13;
    public static final int COLON=14;
    public static final int COMMA=15;
    public static final int COMMENT=16;
    public static final int COMPLEX=17;
    public static final int COMPOUND_STATMENT=18;
    public static final int CONTINUED_LINE=19;
    public static final int DEDENT=20;
    public static final int DIGITS=21;
    public static final int DOT=22;
    public static final int DOUBLESLASH=23;
    public static final int DOUBLESLASHEQUAL=24;
    public static final int DOUBLESTAR=25;
    public static final int DOUBLESTAREQUAL=26;
    public static final int EQUAL=27;
    public static final int ESC=28;
    public static final int EXCEPT_STATMENT=29;
    public static final int EXPRESSION_STATMENT=30;
    public static final int Exponent=31;
    public static final int FINALLY_STATMENT=32;
    public static final int FLOAT=33;
    public static final int FOR_STATMENT=34;
    public static final int FUNCTION_DEF=35;
    public static final int GREATER=36;
    public static final int GREATEREQUAL=37;
    public static final int IF_STATMENT=38;
    public static final int IMPORT_STATMENT=39;
    public static final int INDENT=40;
    public static final int INT=41;
    public static final int LBRACK=42;
    public static final int LCURLY=43;
    public static final int LEADING_WS=44;
    public static final int LEFTSHIFT=45;
    public static final int LEFTSHIFTEQUAL=46;
    public static final int LESS=47;
    public static final int LESSEQUAL=48;
    public static final int LONGINT=49;
    public static final int LPAREN=50;
    public static final int MINUS=51;
    public static final int MINUSEQUAL=52;
    public static final int NAME=53;
    public static final int NEWLINE=54;
    public static final int NOTEQUAL=55;
    public static final int PARAMETERS=56;
    public static final int PERCENT=57;
    public static final int PERCENTEQUAL=58;
    public static final int PLUS=59;
    public static final int PLUSEQUAL=60;
    public static final int RBRACK=61;
    public static final int RCURLY=62;
    public static final int RETURN_STATMENT=63;
    public static final int RIGHTSHIFT=64;
    public static final int RIGHTSHIFTEQUAL=65;
    public static final int RPAREN=66;
    public static final int SEMI=67;
    public static final int SIMPLE_STATMENT=68;
    public static final int SLASH=69;
    public static final int SLASHEQUAL=70;
    public static final int STAR=71;
    public static final int STAREQUAL=72;
    public static final int STATMENT=73;
    public static final int STRING=74;
    public static final int TESTLIST=75;
    public static final int TILDE=76;
    public static final int TRY_STATMENT=77;
    public static final int TUPLE=78;
    public static final int VARIABLE=79;
    public static final int VBAR=80;
    public static final int VBAREQUAL=81;
    public static final int WHILE_STATMENT=82;
    public static final int WS=83;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public PythonParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public PythonParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

protected TreeAdaptor adaptor = new CommonTreeAdaptor();

public void setTreeAdaptor(TreeAdaptor adaptor) {
    this.adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor() {
    return adaptor;
}
    public String[] getTokenNames() { return PythonParser.tokenNames; }
    public String getGrammarFileName() { return "Python.g"; }


    public static class single_input_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "single_input"
    // Python.g:102:1: single_input : ( NEWLINE | simple_stmt | compound_stmt NEWLINE );
    public final PythonParser.single_input_return single_input() throws RecognitionException {
        PythonParser.single_input_return retval = new PythonParser.single_input_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NEWLINE1=null;
        Token NEWLINE4=null;
        PythonParser.simple_stmt_return simple_stmt2 =null;

        PythonParser.compound_stmt_return compound_stmt3 =null;


        CommonTree NEWLINE1_tree=null;
        CommonTree NEWLINE4_tree=null;

        try {
            // Python.g:103:5: ( NEWLINE | simple_stmt | compound_stmt NEWLINE )
            int alt1=3;
            switch ( input.LA(1) ) {
            case NEWLINE:
                {
                alt1=1;
                }
                break;
            case BACKQUOTE:
            case COMPLEX:
            case FLOAT:
            case INT:
            case LBRACK:
            case LCURLY:
            case LONGINT:
            case LPAREN:
            case MINUS:
            case NAME:
            case PLUS:
            case STRING:
            case TILDE:
            case 85:
            case 86:
            case 88:
            case 90:
            case 94:
            case 97:
            case 98:
            case 100:
            case 103:
            case 104:
            case 106:
            case 107:
            case 108:
            case 109:
            case 112:
                {
                alt1=2;
                }
                break;
            case 87:
            case 89:
            case 96:
            case 99:
            case 110:
            case 111:
                {
                alt1=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 1, 0, input);

                throw nvae;

            }

            switch (alt1) {
                case 1 :
                    // Python.g:103:7: NEWLINE
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    NEWLINE1=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_single_input244); 
                    NEWLINE1_tree = 
                    (CommonTree)adaptor.create(NEWLINE1)
                    ;
                    adaptor.addChild(root_0, NEWLINE1_tree);


                    }
                    break;
                case 2 :
                    // Python.g:104:4: simple_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_simple_stmt_in_single_input249);
                    simple_stmt2=simple_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, simple_stmt2.getTree());

                    }
                    break;
                case 3 :
                    // Python.g:105:4: compound_stmt NEWLINE
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_compound_stmt_in_single_input254);
                    compound_stmt3=compound_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, compound_stmt3.getTree());

                    NEWLINE4=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_single_input256); 
                    NEWLINE4_tree = 
                    (CommonTree)adaptor.create(NEWLINE4)
                    ;
                    adaptor.addChild(root_0, NEWLINE4_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "single_input"


    public static class file_input_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "file_input"
    // Python.g:108:1: file_input : ( NEWLINE | stmt )* ;
    public final PythonParser.file_input_return file_input() throws RecognitionException {
        PythonParser.file_input_return retval = new PythonParser.file_input_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NEWLINE5=null;
        PythonParser.stmt_return stmt6 =null;


        CommonTree NEWLINE5_tree=null;

        try {
            // Python.g:109:5: ( ( NEWLINE | stmt )* )
            // Python.g:109:9: ( NEWLINE | stmt )*
            {
            root_0 = (CommonTree)adaptor.nil();


            // Python.g:109:9: ( NEWLINE | stmt )*
            loop2:
            do {
                int alt2=3;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==NEWLINE) ) {
                    alt2=1;
                }
                else if ( (LA2_0==BACKQUOTE||LA2_0==COMPLEX||LA2_0==FLOAT||(LA2_0 >= INT && LA2_0 <= LCURLY)||(LA2_0 >= LONGINT && LA2_0 <= MINUS)||LA2_0==NAME||LA2_0==PLUS||LA2_0==STRING||LA2_0==TILDE||(LA2_0 >= 85 && LA2_0 <= 90)||LA2_0==94||(LA2_0 >= 96 && LA2_0 <= 100)||(LA2_0 >= 103 && LA2_0 <= 104)||(LA2_0 >= 106 && LA2_0 <= 112)) ) {
                    alt2=2;
                }


                switch (alt2) {
            	case 1 :
            	    // Python.g:109:10: NEWLINE
            	    {
            	    NEWLINE5=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_file_input273); 
            	    NEWLINE5_tree = 
            	    (CommonTree)adaptor.create(NEWLINE5)
            	    ;
            	    adaptor.addChild(root_0, NEWLINE5_tree);


            	    }
            	    break;
            	case 2 :
            	    // Python.g:109:20: stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_file_input277);
            	    stmt6=stmt();

            	    state._fsp--;

            	    adaptor.addChild(root_0, stmt6.getTree());

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "file_input"


    public static class eval_input_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "eval_input"
    // Python.g:112:1: eval_input : ( NEWLINE )* testlist ( NEWLINE )* ;
    public final PythonParser.eval_input_return eval_input() throws RecognitionException {
        PythonParser.eval_input_return retval = new PythonParser.eval_input_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NEWLINE7=null;
        Token NEWLINE9=null;
        PythonParser.testlist_return testlist8 =null;


        CommonTree NEWLINE7_tree=null;
        CommonTree NEWLINE9_tree=null;

        try {
            // Python.g:113:5: ( ( NEWLINE )* testlist ( NEWLINE )* )
            // Python.g:113:9: ( NEWLINE )* testlist ( NEWLINE )*
            {
            root_0 = (CommonTree)adaptor.nil();


            // Python.g:113:9: ( NEWLINE )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==NEWLINE) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // Python.g:113:10: NEWLINE
            	    {
            	    NEWLINE7=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_eval_input296); 
            	    NEWLINE7_tree = 
            	    (CommonTree)adaptor.create(NEWLINE7)
            	    ;
            	    adaptor.addChild(root_0, NEWLINE7_tree);


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            pushFollow(FOLLOW_testlist_in_eval_input300);
            testlist8=testlist();

            state._fsp--;

            adaptor.addChild(root_0, testlist8.getTree());

            // Python.g:113:29: ( NEWLINE )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( (LA4_0==NEWLINE) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // Python.g:113:30: NEWLINE
            	    {
            	    NEWLINE9=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_eval_input303); 
            	    NEWLINE9_tree = 
            	    (CommonTree)adaptor.create(NEWLINE9)
            	    ;
            	    adaptor.addChild(root_0, NEWLINE9_tree);


            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "eval_input"


    public static class funcdef_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "funcdef"
    // Python.g:116:1: funcdef : 'def' NAME parameters COLON suite -> ^( FUNCTION_DEF NAME parameters suite ) ;
    public final PythonParser.funcdef_return funcdef() throws RecognitionException {
        PythonParser.funcdef_return retval = new PythonParser.funcdef_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal10=null;
        Token NAME11=null;
        Token COLON13=null;
        PythonParser.parameters_return parameters12 =null;

        PythonParser.suite_return suite14 =null;


        CommonTree string_literal10_tree=null;
        CommonTree NAME11_tree=null;
        CommonTree COLON13_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,"token NAME");
        RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,"token 89");
        RewriteRuleSubtreeStream stream_parameters=new RewriteRuleSubtreeStream(adaptor,"rule parameters");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        try {
            // Python.g:117:5: ( 'def' NAME parameters COLON suite -> ^( FUNCTION_DEF NAME parameters suite ) )
            // Python.g:117:9: 'def' NAME parameters COLON suite
            {
            string_literal10=(Token)match(input,89,FOLLOW_89_in_funcdef321);  
            stream_89.add(string_literal10);


            NAME11=(Token)match(input,NAME,FOLLOW_NAME_in_funcdef323);  
            stream_NAME.add(NAME11);


            pushFollow(FOLLOW_parameters_in_funcdef325);
            parameters12=parameters();

            state._fsp--;

            stream_parameters.add(parameters12.getTree());

            COLON13=(Token)match(input,COLON,FOLLOW_COLON_in_funcdef327);  
            stream_COLON.add(COLON13);


            pushFollow(FOLLOW_suite_in_funcdef329);
            suite14=suite();

            state._fsp--;

            stream_suite.add(suite14.getTree());

            // AST REWRITE
            // elements: suite, parameters, NAME
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 117:43: -> ^( FUNCTION_DEF NAME parameters suite )
            {
                // Python.g:117:46: ^( FUNCTION_DEF NAME parameters suite )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(FUNCTION_DEF, "FUNCTION_DEF")
                , root_1);

                adaptor.addChild(root_1, 
                stream_NAME.nextNode()
                );

                adaptor.addChild(root_1, stream_parameters.nextTree());

                adaptor.addChild(root_1, stream_suite.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "funcdef"


    public static class parameters_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "parameters"
    // Python.g:119:1: parameters : LPAREN ( varargslist )? RPAREN -> ^( PARAMETERS ( varargslist )? ) ;
    public final PythonParser.parameters_return parameters() throws RecognitionException {
        PythonParser.parameters_return retval = new PythonParser.parameters_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LPAREN15=null;
        Token RPAREN17=null;
        PythonParser.varargslist_return varargslist16 =null;


        CommonTree LPAREN15_tree=null;
        CommonTree RPAREN17_tree=null;
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleSubtreeStream stream_varargslist=new RewriteRuleSubtreeStream(adaptor,"rule varargslist");
        try {
            // Python.g:120:5: ( LPAREN ( varargslist )? RPAREN -> ^( PARAMETERS ( varargslist )? ) )
            // Python.g:120:9: LPAREN ( varargslist )? RPAREN
            {
            LPAREN15=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_parameters355);  
            stream_LPAREN.add(LPAREN15);


            // Python.g:120:16: ( varargslist )?
            int alt5=2;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==DOUBLESTAR||LA5_0==LPAREN||LA5_0==NAME||LA5_0==STAR) ) {
                alt5=1;
            }
            switch (alt5) {
                case 1 :
                    // Python.g:120:17: varargslist
                    {
                    pushFollow(FOLLOW_varargslist_in_parameters358);
                    varargslist16=varargslist();

                    state._fsp--;

                    stream_varargslist.add(varargslist16.getTree());

                    }
                    break;

            }


            RPAREN17=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_parameters362);  
            stream_RPAREN.add(RPAREN17);


            // AST REWRITE
            // elements: varargslist
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 120:38: -> ^( PARAMETERS ( varargslist )? )
            {
                // Python.g:120:41: ^( PARAMETERS ( varargslist )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(PARAMETERS, "PARAMETERS")
                , root_1);

                // Python.g:120:54: ( varargslist )?
                if ( stream_varargslist.hasNext() ) {
                    adaptor.addChild(root_1, stream_varargslist.nextTree());

                }
                stream_varargslist.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "parameters"


    public static class varargslist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "varargslist"
    // Python.g:123:1: varargslist : ( defparameter ( options {greedy=true; } : COMMA defparameter )* ( COMMA ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )? )? | STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME );
    public final PythonParser.varargslist_return varargslist() throws RecognitionException {
        PythonParser.varargslist_return retval = new PythonParser.varargslist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA19=null;
        Token COMMA21=null;
        Token STAR22=null;
        Token NAME23=null;
        Token COMMA24=null;
        Token DOUBLESTAR25=null;
        Token NAME26=null;
        Token DOUBLESTAR27=null;
        Token NAME28=null;
        Token STAR29=null;
        Token NAME30=null;
        Token COMMA31=null;
        Token DOUBLESTAR32=null;
        Token NAME33=null;
        Token DOUBLESTAR34=null;
        Token NAME35=null;
        PythonParser.defparameter_return defparameter18 =null;

        PythonParser.defparameter_return defparameter20 =null;


        CommonTree COMMA19_tree=null;
        CommonTree COMMA21_tree=null;
        CommonTree STAR22_tree=null;
        CommonTree NAME23_tree=null;
        CommonTree COMMA24_tree=null;
        CommonTree DOUBLESTAR25_tree=null;
        CommonTree NAME26_tree=null;
        CommonTree DOUBLESTAR27_tree=null;
        CommonTree NAME28_tree=null;
        CommonTree STAR29_tree=null;
        CommonTree NAME30_tree=null;
        CommonTree COMMA31_tree=null;
        CommonTree DOUBLESTAR32_tree=null;
        CommonTree NAME33_tree=null;
        CommonTree DOUBLESTAR34_tree=null;
        CommonTree NAME35_tree=null;

        try {
            // Python.g:124:5: ( defparameter ( options {greedy=true; } : COMMA defparameter )* ( COMMA ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )? )? | STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )
            int alt11=3;
            switch ( input.LA(1) ) {
            case LPAREN:
            case NAME:
                {
                alt11=1;
                }
                break;
            case STAR:
                {
                alt11=2;
                }
                break;
            case DOUBLESTAR:
                {
                alt11=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 11, 0, input);

                throw nvae;

            }

            switch (alt11) {
                case 1 :
                    // Python.g:124:9: defparameter ( options {greedy=true; } : COMMA defparameter )* ( COMMA ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )? )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_defparameter_in_varargslist389);
                    defparameter18=defparameter();

                    state._fsp--;

                    adaptor.addChild(root_0, defparameter18.getTree());

                    // Python.g:124:22: ( options {greedy=true; } : COMMA defparameter )*
                    loop6:
                    do {
                        int alt6=2;
                        int LA6_0 = input.LA(1);

                        if ( (LA6_0==COMMA) ) {
                            int LA6_1 = input.LA(2);

                            if ( (LA6_1==LPAREN||LA6_1==NAME) ) {
                                alt6=1;
                            }


                        }


                        switch (alt6) {
                    	case 1 :
                    	    // Python.g:124:46: COMMA defparameter
                    	    {
                    	    COMMA19=(Token)match(input,COMMA,FOLLOW_COMMA_in_varargslist399); 
                    	    COMMA19_tree = 
                    	    (CommonTree)adaptor.create(COMMA19)
                    	    ;
                    	    adaptor.addChild(root_0, COMMA19_tree);


                    	    pushFollow(FOLLOW_defparameter_in_varargslist401);
                    	    defparameter20=defparameter();

                    	    state._fsp--;

                    	    adaptor.addChild(root_0, defparameter20.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop6;
                        }
                    } while (true);


                    // Python.g:125:9: ( COMMA ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )? )?
                    int alt9=2;
                    int LA9_0 = input.LA(1);

                    if ( (LA9_0==COMMA) ) {
                        alt9=1;
                    }
                    switch (alt9) {
                        case 1 :
                            // Python.g:125:10: COMMA ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )?
                            {
                            COMMA21=(Token)match(input,COMMA,FOLLOW_COMMA_in_varargslist414); 
                            COMMA21_tree = 
                            (CommonTree)adaptor.create(COMMA21)
                            ;
                            adaptor.addChild(root_0, COMMA21_tree);


                            // Python.g:126:13: ( STAR NAME ( COMMA DOUBLESTAR NAME )? | DOUBLESTAR NAME )?
                            int alt8=3;
                            int LA8_0 = input.LA(1);

                            if ( (LA8_0==STAR) ) {
                                alt8=1;
                            }
                            else if ( (LA8_0==DOUBLESTAR) ) {
                                alt8=2;
                            }
                            switch (alt8) {
                                case 1 :
                                    // Python.g:126:15: STAR NAME ( COMMA DOUBLESTAR NAME )?
                                    {
                                    STAR22=(Token)match(input,STAR,FOLLOW_STAR_in_varargslist430); 
                                    STAR22_tree = 
                                    (CommonTree)adaptor.create(STAR22)
                                    ;
                                    adaptor.addChild(root_0, STAR22_tree);


                                    NAME23=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist432); 
                                    NAME23_tree = 
                                    (CommonTree)adaptor.create(NAME23)
                                    ;
                                    adaptor.addChild(root_0, NAME23_tree);


                                    // Python.g:126:25: ( COMMA DOUBLESTAR NAME )?
                                    int alt7=2;
                                    int LA7_0 = input.LA(1);

                                    if ( (LA7_0==COMMA) ) {
                                        alt7=1;
                                    }
                                    switch (alt7) {
                                        case 1 :
                                            // Python.g:126:26: COMMA DOUBLESTAR NAME
                                            {
                                            COMMA24=(Token)match(input,COMMA,FOLLOW_COMMA_in_varargslist435); 
                                            COMMA24_tree = 
                                            (CommonTree)adaptor.create(COMMA24)
                                            ;
                                            adaptor.addChild(root_0, COMMA24_tree);


                                            DOUBLESTAR25=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_varargslist437); 
                                            DOUBLESTAR25_tree = 
                                            (CommonTree)adaptor.create(DOUBLESTAR25)
                                            ;
                                            adaptor.addChild(root_0, DOUBLESTAR25_tree);


                                            NAME26=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist439); 
                                            NAME26_tree = 
                                            (CommonTree)adaptor.create(NAME26)
                                            ;
                                            adaptor.addChild(root_0, NAME26_tree);


                                            }
                                            break;

                                    }


                                    }
                                    break;
                                case 2 :
                                    // Python.g:127:15: DOUBLESTAR NAME
                                    {
                                    DOUBLESTAR27=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_varargslist457); 
                                    DOUBLESTAR27_tree = 
                                    (CommonTree)adaptor.create(DOUBLESTAR27)
                                    ;
                                    adaptor.addChild(root_0, DOUBLESTAR27_tree);


                                    NAME28=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist459); 
                                    NAME28_tree = 
                                    (CommonTree)adaptor.create(NAME28)
                                    ;
                                    adaptor.addChild(root_0, NAME28_tree);


                                    }
                                    break;

                            }


                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // Python.g:130:9: STAR NAME ( COMMA DOUBLESTAR NAME )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    STAR29=(Token)match(input,STAR,FOLLOW_STAR_in_varargslist495); 
                    STAR29_tree = 
                    (CommonTree)adaptor.create(STAR29)
                    ;
                    adaptor.addChild(root_0, STAR29_tree);


                    NAME30=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist497); 
                    NAME30_tree = 
                    (CommonTree)adaptor.create(NAME30)
                    ;
                    adaptor.addChild(root_0, NAME30_tree);


                    // Python.g:130:19: ( COMMA DOUBLESTAR NAME )?
                    int alt10=2;
                    int LA10_0 = input.LA(1);

                    if ( (LA10_0==COMMA) ) {
                        alt10=1;
                    }
                    switch (alt10) {
                        case 1 :
                            // Python.g:130:20: COMMA DOUBLESTAR NAME
                            {
                            COMMA31=(Token)match(input,COMMA,FOLLOW_COMMA_in_varargslist500); 
                            COMMA31_tree = 
                            (CommonTree)adaptor.create(COMMA31)
                            ;
                            adaptor.addChild(root_0, COMMA31_tree);


                            DOUBLESTAR32=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_varargslist502); 
                            DOUBLESTAR32_tree = 
                            (CommonTree)adaptor.create(DOUBLESTAR32)
                            ;
                            adaptor.addChild(root_0, DOUBLESTAR32_tree);


                            NAME33=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist504); 
                            NAME33_tree = 
                            (CommonTree)adaptor.create(NAME33)
                            ;
                            adaptor.addChild(root_0, NAME33_tree);


                            }
                            break;

                    }


                    }
                    break;
                case 3 :
                    // Python.g:131:9: DOUBLESTAR NAME
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    DOUBLESTAR34=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_varargslist516); 
                    DOUBLESTAR34_tree = 
                    (CommonTree)adaptor.create(DOUBLESTAR34)
                    ;
                    adaptor.addChild(root_0, DOUBLESTAR34_tree);


                    NAME35=(Token)match(input,NAME,FOLLOW_NAME_in_varargslist518); 
                    NAME35_tree = 
                    (CommonTree)adaptor.create(NAME35)
                    ;
                    adaptor.addChild(root_0, NAME35_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "varargslist"


    public static class defparameter_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "defparameter"
    // Python.g:134:1: defparameter : fpdef ( ASSIGN test )? ;
    public final PythonParser.defparameter_return defparameter() throws RecognitionException {
        PythonParser.defparameter_return retval = new PythonParser.defparameter_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token ASSIGN37=null;
        PythonParser.fpdef_return fpdef36 =null;

        PythonParser.test_return test38 =null;


        CommonTree ASSIGN37_tree=null;

        try {
            // Python.g:135:5: ( fpdef ( ASSIGN test )? )
            // Python.g:135:9: fpdef ( ASSIGN test )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_fpdef_in_defparameter538);
            fpdef36=fpdef();

            state._fsp--;

            adaptor.addChild(root_0, fpdef36.getTree());

            // Python.g:135:15: ( ASSIGN test )?
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==ASSIGN) ) {
                alt12=1;
            }
            switch (alt12) {
                case 1 :
                    // Python.g:135:16: ASSIGN test
                    {
                    ASSIGN37=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_defparameter541); 
                    ASSIGN37_tree = 
                    (CommonTree)adaptor.create(ASSIGN37)
                    ;
                    adaptor.addChild(root_0, ASSIGN37_tree);


                    pushFollow(FOLLOW_test_in_defparameter543);
                    test38=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test38.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "defparameter"


    public static class fpdef_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "fpdef"
    // Python.g:138:1: fpdef : ( NAME | LPAREN fplist RPAREN );
    public final PythonParser.fpdef_return fpdef() throws RecognitionException {
        PythonParser.fpdef_return retval = new PythonParser.fpdef_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NAME39=null;
        Token LPAREN40=null;
        Token RPAREN42=null;
        PythonParser.fplist_return fplist41 =null;


        CommonTree NAME39_tree=null;
        CommonTree LPAREN40_tree=null;
        CommonTree RPAREN42_tree=null;

        try {
            // Python.g:139:5: ( NAME | LPAREN fplist RPAREN )
            int alt13=2;
            int LA13_0 = input.LA(1);

            if ( (LA13_0==NAME) ) {
                alt13=1;
            }
            else if ( (LA13_0==LPAREN) ) {
                alt13=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 13, 0, input);

                throw nvae;

            }
            switch (alt13) {
                case 1 :
                    // Python.g:139:9: NAME
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    NAME39=(Token)match(input,NAME,FOLLOW_NAME_in_fpdef564); 
                    NAME39_tree = 
                    (CommonTree)adaptor.create(NAME39)
                    ;
                    adaptor.addChild(root_0, NAME39_tree);


                    }
                    break;
                case 2 :
                    // Python.g:140:6: LPAREN fplist RPAREN
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LPAREN40=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_fpdef571); 
                    LPAREN40_tree = 
                    (CommonTree)adaptor.create(LPAREN40)
                    ;
                    adaptor.addChild(root_0, LPAREN40_tree);


                    pushFollow(FOLLOW_fplist_in_fpdef573);
                    fplist41=fplist();

                    state._fsp--;

                    adaptor.addChild(root_0, fplist41.getTree());

                    RPAREN42=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_fpdef575); 
                    RPAREN42_tree = 
                    (CommonTree)adaptor.create(RPAREN42)
                    ;
                    adaptor.addChild(root_0, RPAREN42_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "fpdef"


    public static class fplist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "fplist"
    // Python.g:143:1: fplist : fpdef ( options {greedy=true; } : COMMA fpdef )* ( COMMA )? ;
    public final PythonParser.fplist_return fplist() throws RecognitionException {
        PythonParser.fplist_return retval = new PythonParser.fplist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA44=null;
        Token COMMA46=null;
        PythonParser.fpdef_return fpdef43 =null;

        PythonParser.fpdef_return fpdef45 =null;


        CommonTree COMMA44_tree=null;
        CommonTree COMMA46_tree=null;

        try {
            // Python.g:144:5: ( fpdef ( options {greedy=true; } : COMMA fpdef )* ( COMMA )? )
            // Python.g:144:9: fpdef ( options {greedy=true; } : COMMA fpdef )* ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_fpdef_in_fplist592);
            fpdef43=fpdef();

            state._fsp--;

            adaptor.addChild(root_0, fpdef43.getTree());

            // Python.g:144:15: ( options {greedy=true; } : COMMA fpdef )*
            loop14:
            do {
                int alt14=2;
                int LA14_0 = input.LA(1);

                if ( (LA14_0==COMMA) ) {
                    int LA14_1 = input.LA(2);

                    if ( (LA14_1==LPAREN||LA14_1==NAME) ) {
                        alt14=1;
                    }


                }


                switch (alt14) {
            	case 1 :
            	    // Python.g:144:39: COMMA fpdef
            	    {
            	    COMMA44=(Token)match(input,COMMA,FOLLOW_COMMA_in_fplist602); 
            	    COMMA44_tree = 
            	    (CommonTree)adaptor.create(COMMA44)
            	    ;
            	    adaptor.addChild(root_0, COMMA44_tree);


            	    pushFollow(FOLLOW_fpdef_in_fplist604);
            	    fpdef45=fpdef();

            	    state._fsp--;

            	    adaptor.addChild(root_0, fpdef45.getTree());

            	    }
            	    break;

            	default :
            	    break loop14;
                }
            } while (true);


            // Python.g:144:53: ( COMMA )?
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==COMMA) ) {
                alt15=1;
            }
            switch (alt15) {
                case 1 :
                    // Python.g:144:54: COMMA
                    {
                    COMMA46=(Token)match(input,COMMA,FOLLOW_COMMA_in_fplist609); 
                    COMMA46_tree = 
                    (CommonTree)adaptor.create(COMMA46)
                    ;
                    adaptor.addChild(root_0, COMMA46_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "fplist"


    public static class stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "stmt"
    // Python.g:148:1: stmt : ( simple_stmt | compound_stmt );
    public final PythonParser.stmt_return stmt() throws RecognitionException {
        PythonParser.stmt_return retval = new PythonParser.stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.simple_stmt_return simple_stmt47 =null;

        PythonParser.compound_stmt_return compound_stmt48 =null;



        try {
            // Python.g:148:5: ( simple_stmt | compound_stmt )
            int alt16=2;
            int LA16_0 = input.LA(1);

            if ( (LA16_0==BACKQUOTE||LA16_0==COMPLEX||LA16_0==FLOAT||(LA16_0 >= INT && LA16_0 <= LCURLY)||(LA16_0 >= LONGINT && LA16_0 <= MINUS)||LA16_0==NAME||LA16_0==PLUS||LA16_0==STRING||LA16_0==TILDE||(LA16_0 >= 85 && LA16_0 <= 86)||LA16_0==88||LA16_0==90||LA16_0==94||(LA16_0 >= 97 && LA16_0 <= 98)||LA16_0==100||(LA16_0 >= 103 && LA16_0 <= 104)||(LA16_0 >= 106 && LA16_0 <= 109)||LA16_0==112) ) {
                alt16=1;
            }
            else if ( (LA16_0==87||LA16_0==89||LA16_0==96||LA16_0==99||(LA16_0 >= 110 && LA16_0 <= 111)) ) {
                alt16=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 16, 0, input);

                throw nvae;

            }
            switch (alt16) {
                case 1 :
                    // Python.g:148:7: simple_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_simple_stmt_in_stmt621);
                    simple_stmt47=simple_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, simple_stmt47.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:149:4: compound_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_compound_stmt_in_stmt626);
                    compound_stmt48=compound_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, compound_stmt48.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "stmt"


    public static class simple_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "simple_stmt"
    // Python.g:152:1: simple_stmt : small_stmt ( options {greedy=true; } : SEMI small_stmt )* ( SEMI )? NEWLINE -> ^( SIMPLE_STATMENT small_stmt ( SEMI small_stmt )* ( SEMI )? ) ;
    public final PythonParser.simple_stmt_return simple_stmt() throws RecognitionException {
        PythonParser.simple_stmt_return retval = new PythonParser.simple_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token SEMI50=null;
        Token SEMI52=null;
        Token NEWLINE53=null;
        PythonParser.small_stmt_return small_stmt49 =null;

        PythonParser.small_stmt_return small_stmt51 =null;


        CommonTree SEMI50_tree=null;
        CommonTree SEMI52_tree=null;
        CommonTree NEWLINE53_tree=null;
        RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
        RewriteRuleTokenStream stream_SEMI=new RewriteRuleTokenStream(adaptor,"token SEMI");
        RewriteRuleSubtreeStream stream_small_stmt=new RewriteRuleSubtreeStream(adaptor,"rule small_stmt");
        try {
            // Python.g:153:5: ( small_stmt ( options {greedy=true; } : SEMI small_stmt )* ( SEMI )? NEWLINE -> ^( SIMPLE_STATMENT small_stmt ( SEMI small_stmt )* ( SEMI )? ) )
            // Python.g:153:9: small_stmt ( options {greedy=true; } : SEMI small_stmt )* ( SEMI )? NEWLINE
            {
            pushFollow(FOLLOW_small_stmt_in_simple_stmt642);
            small_stmt49=small_stmt();

            state._fsp--;

            stream_small_stmt.add(small_stmt49.getTree());

            // Python.g:153:20: ( options {greedy=true; } : SEMI small_stmt )*
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==SEMI) ) {
                    int LA17_1 = input.LA(2);

                    if ( (LA17_1==BACKQUOTE||LA17_1==COMPLEX||LA17_1==FLOAT||(LA17_1 >= INT && LA17_1 <= LCURLY)||(LA17_1 >= LONGINT && LA17_1 <= MINUS)||LA17_1==NAME||LA17_1==PLUS||LA17_1==STRING||LA17_1==TILDE||(LA17_1 >= 85 && LA17_1 <= 86)||LA17_1==88||LA17_1==90||LA17_1==94||(LA17_1 >= 97 && LA17_1 <= 98)||LA17_1==100||(LA17_1 >= 103 && LA17_1 <= 104)||(LA17_1 >= 106 && LA17_1 <= 109)||LA17_1==112) ) {
                        alt17=1;
                    }


                }


                switch (alt17) {
            	case 1 :
            	    // Python.g:153:44: SEMI small_stmt
            	    {
            	    SEMI50=(Token)match(input,SEMI,FOLLOW_SEMI_in_simple_stmt652);  
            	    stream_SEMI.add(SEMI50);


            	    pushFollow(FOLLOW_small_stmt_in_simple_stmt654);
            	    small_stmt51=small_stmt();

            	    state._fsp--;

            	    stream_small_stmt.add(small_stmt51.getTree());

            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);


            // Python.g:153:62: ( SEMI )?
            int alt18=2;
            int LA18_0 = input.LA(1);

            if ( (LA18_0==SEMI) ) {
                alt18=1;
            }
            switch (alt18) {
                case 1 :
                    // Python.g:153:63: SEMI
                    {
                    SEMI52=(Token)match(input,SEMI,FOLLOW_SEMI_in_simple_stmt659);  
                    stream_SEMI.add(SEMI52);


                    }
                    break;

            }


            NEWLINE53=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_simple_stmt663);  
            stream_NEWLINE.add(NEWLINE53);


            // AST REWRITE
            // elements: small_stmt, SEMI, SEMI, small_stmt
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 154:5: -> ^( SIMPLE_STATMENT small_stmt ( SEMI small_stmt )* ( SEMI )? )
            {
                // Python.g:154:8: ^( SIMPLE_STATMENT small_stmt ( SEMI small_stmt )* ( SEMI )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(SIMPLE_STATMENT, "SIMPLE_STATMENT")
                , root_1);

                adaptor.addChild(root_1, stream_small_stmt.nextTree());

                // Python.g:154:37: ( SEMI small_stmt )*
                while ( stream_small_stmt.hasNext()||stream_SEMI.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_SEMI.nextNode()
                    );

                    adaptor.addChild(root_1, stream_small_stmt.nextTree());

                }
                stream_small_stmt.reset();
                stream_SEMI.reset();

                // Python.g:154:56: ( SEMI )?
                if ( stream_SEMI.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_SEMI.nextNode()
                    );

                }
                stream_SEMI.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "simple_stmt"


    public static class small_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "small_stmt"
    // Python.g:157:1: small_stmt : ( expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt );
    public final PythonParser.small_stmt_return small_stmt() throws RecognitionException {
        PythonParser.small_stmt_return retval = new PythonParser.small_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.expr_stmt_return expr_stmt54 =null;

        PythonParser.print_stmt_return print_stmt55 =null;

        PythonParser.del_stmt_return del_stmt56 =null;

        PythonParser.pass_stmt_return pass_stmt57 =null;

        PythonParser.flow_stmt_return flow_stmt58 =null;

        PythonParser.import_stmt_return import_stmt59 =null;

        PythonParser.global_stmt_return global_stmt60 =null;

        PythonParser.exec_stmt_return exec_stmt61 =null;

        PythonParser.assert_stmt_return assert_stmt62 =null;



        try {
            // Python.g:157:11: ( expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt )
            int alt19=9;
            switch ( input.LA(1) ) {
            case BACKQUOTE:
            case COMPLEX:
            case FLOAT:
            case INT:
            case LBRACK:
            case LCURLY:
            case LONGINT:
            case LPAREN:
            case MINUS:
            case NAME:
            case PLUS:
            case STRING:
            case TILDE:
            case 103:
            case 104:
                {
                alt19=1;
                }
                break;
            case 107:
                {
                alt19=2;
                }
                break;
            case 90:
                {
                alt19=3;
                }
                break;
            case 106:
                {
                alt19=4;
                }
                break;
            case 86:
            case 88:
            case 108:
            case 109:
            case 112:
                {
                alt19=5;
                }
                break;
            case 97:
            case 100:
                {
                alt19=6;
                }
                break;
            case 98:
                {
                alt19=7;
                }
                break;
            case 94:
                {
                alt19=8;
                }
                break;
            case 85:
                {
                alt19=9;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 19, 0, input);

                throw nvae;

            }

            switch (alt19) {
                case 1 :
                    // Python.g:157:13: expr_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_expr_stmt_in_small_stmt697);
                    expr_stmt54=expr_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, expr_stmt54.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:158:4: print_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_print_stmt_in_small_stmt702);
                    print_stmt55=print_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, print_stmt55.getTree());

                    }
                    break;
                case 3 :
                    // Python.g:159:4: del_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_del_stmt_in_small_stmt708);
                    del_stmt56=del_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, del_stmt56.getTree());

                    }
                    break;
                case 4 :
                    // Python.g:160:4: pass_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_pass_stmt_in_small_stmt713);
                    pass_stmt57=pass_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, pass_stmt57.getTree());

                    }
                    break;
                case 5 :
                    // Python.g:161:4: flow_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_flow_stmt_in_small_stmt718);
                    flow_stmt58=flow_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, flow_stmt58.getTree());

                    }
                    break;
                case 6 :
                    // Python.g:162:4: import_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_import_stmt_in_small_stmt723);
                    import_stmt59=import_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, import_stmt59.getTree());

                    }
                    break;
                case 7 :
                    // Python.g:163:4: global_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_global_stmt_in_small_stmt729);
                    global_stmt60=global_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, global_stmt60.getTree());

                    }
                    break;
                case 8 :
                    // Python.g:164:4: exec_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_exec_stmt_in_small_stmt734);
                    exec_stmt61=exec_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, exec_stmt61.getTree());

                    }
                    break;
                case 9 :
                    // Python.g:165:4: assert_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_assert_stmt_in_small_stmt739);
                    assert_stmt62=assert_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, assert_stmt62.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "small_stmt"


    public static class expr_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "expr_stmt"
    // Python.g:168:1: expr_stmt : a= testlist ( augassign b= testlist | ( ASSIGN c= testlist )+ )? -> ^( EXPRESSION_STATMENT $a ( augassign $b)? ( ASSIGN $c)? ) ;
    public final PythonParser.expr_stmt_return expr_stmt() throws RecognitionException {
        PythonParser.expr_stmt_return retval = new PythonParser.expr_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token ASSIGN64=null;
        PythonParser.testlist_return a =null;

        PythonParser.testlist_return b =null;

        PythonParser.testlist_return c =null;

        PythonParser.augassign_return augassign63 =null;


        CommonTree ASSIGN64_tree=null;
        RewriteRuleTokenStream stream_ASSIGN=new RewriteRuleTokenStream(adaptor,"token ASSIGN");
        RewriteRuleSubtreeStream stream_augassign=new RewriteRuleSubtreeStream(adaptor,"rule augassign");
        RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,"rule testlist");
        try {
            // Python.g:169:2: (a= testlist ( augassign b= testlist | ( ASSIGN c= testlist )+ )? -> ^( EXPRESSION_STATMENT $a ( augassign $b)? ( ASSIGN $c)? ) )
            // Python.g:169:4: a= testlist ( augassign b= testlist | ( ASSIGN c= testlist )+ )?
            {
            pushFollow(FOLLOW_testlist_in_expr_stmt752);
            a=testlist();

            state._fsp--;

            stream_testlist.add(a.getTree());

            // Python.g:169:15: ( augassign b= testlist | ( ASSIGN c= testlist )+ )?
            int alt21=3;
            int LA21_0 = input.LA(1);

            if ( (LA21_0==AMPEREQUAL||LA21_0==CIRCUMFLEXEQUAL||LA21_0==DOUBLESLASHEQUAL||LA21_0==DOUBLESTAREQUAL||LA21_0==LEFTSHIFTEQUAL||LA21_0==MINUSEQUAL||LA21_0==PERCENTEQUAL||LA21_0==PLUSEQUAL||LA21_0==RIGHTSHIFTEQUAL||LA21_0==SLASHEQUAL||LA21_0==STAREQUAL||LA21_0==VBAREQUAL) ) {
                alt21=1;
            }
            else if ( (LA21_0==ASSIGN) ) {
                alt21=2;
            }
            switch (alt21) {
                case 1 :
                    // Python.g:169:16: augassign b= testlist
                    {
                    pushFollow(FOLLOW_augassign_in_expr_stmt755);
                    augassign63=augassign();

                    state._fsp--;

                    stream_augassign.add(augassign63.getTree());

                    pushFollow(FOLLOW_testlist_in_expr_stmt759);
                    b=testlist();

                    state._fsp--;

                    stream_testlist.add(b.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:169:39: ( ASSIGN c= testlist )+
                    {
                    // Python.g:169:39: ( ASSIGN c= testlist )+
                    int cnt20=0;
                    loop20:
                    do {
                        int alt20=2;
                        int LA20_0 = input.LA(1);

                        if ( (LA20_0==ASSIGN) ) {
                            alt20=1;
                        }


                        switch (alt20) {
                    	case 1 :
                    	    // Python.g:169:40: ASSIGN c= testlist
                    	    {
                    	    ASSIGN64=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_expr_stmt764);  
                    	    stream_ASSIGN.add(ASSIGN64);


                    	    pushFollow(FOLLOW_testlist_in_expr_stmt768);
                    	    c=testlist();

                    	    state._fsp--;

                    	    stream_testlist.add(c.getTree());

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt20 >= 1 ) break loop20;
                                EarlyExitException eee =
                                    new EarlyExitException(20, input);
                                throw eee;
                        }
                        cnt20++;
                    } while (true);


                    }
                    break;

            }


            // AST REWRITE
            // elements: c, b, augassign, a, ASSIGN
            // token labels: 
            // rule labels: retval, b, c, a
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.tree:null);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"rule c",c!=null?c.tree:null);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"rule a",a!=null?a.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 170:3: -> ^( EXPRESSION_STATMENT $a ( augassign $b)? ( ASSIGN $c)? )
            {
                // Python.g:170:6: ^( EXPRESSION_STATMENT $a ( augassign $b)? ( ASSIGN $c)? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(EXPRESSION_STATMENT, "EXPRESSION_STATMENT")
                , root_1);

                adaptor.addChild(root_1, stream_a.nextTree());

                // Python.g:170:31: ( augassign $b)?
                if ( stream_b.hasNext()||stream_augassign.hasNext() ) {
                    adaptor.addChild(root_1, stream_augassign.nextTree());

                    adaptor.addChild(root_1, stream_b.nextTree());

                }
                stream_b.reset();
                stream_augassign.reset();

                // Python.g:170:48: ( ASSIGN $c)?
                if ( stream_c.hasNext()||stream_ASSIGN.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_ASSIGN.nextNode()
                    );

                    adaptor.addChild(root_1, stream_c.nextTree());

                }
                stream_c.reset();
                stream_ASSIGN.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "expr_stmt"


    public static class augassign_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "augassign"
    // Python.g:173:1: augassign : ( PLUSEQUAL | MINUSEQUAL | STAREQUAL | SLASHEQUAL | PERCENTEQUAL | AMPEREQUAL | VBAREQUAL | CIRCUMFLEXEQUAL | LEFTSHIFTEQUAL | RIGHTSHIFTEQUAL | DOUBLESTAREQUAL | DOUBLESLASHEQUAL );
    public final PythonParser.augassign_return augassign() throws RecognitionException {
        PythonParser.augassign_return retval = new PythonParser.augassign_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token set65=null;

        CommonTree set65_tree=null;

        try {
            // Python.g:174:5: ( PLUSEQUAL | MINUSEQUAL | STAREQUAL | SLASHEQUAL | PERCENTEQUAL | AMPEREQUAL | VBAREQUAL | CIRCUMFLEXEQUAL | LEFTSHIFTEQUAL | RIGHTSHIFTEQUAL | DOUBLESTAREQUAL | DOUBLESLASHEQUAL )
            // Python.g:
            {
            root_0 = (CommonTree)adaptor.nil();


            set65=(Token)input.LT(1);

            if ( input.LA(1)==AMPEREQUAL||input.LA(1)==CIRCUMFLEXEQUAL||input.LA(1)==DOUBLESLASHEQUAL||input.LA(1)==DOUBLESTAREQUAL||input.LA(1)==LEFTSHIFTEQUAL||input.LA(1)==MINUSEQUAL||input.LA(1)==PERCENTEQUAL||input.LA(1)==PLUSEQUAL||input.LA(1)==RIGHTSHIFTEQUAL||input.LA(1)==SLASHEQUAL||input.LA(1)==STAREQUAL||input.LA(1)==VBAREQUAL ) {
                input.consume();
                adaptor.addChild(root_0, 
                (CommonTree)adaptor.create(set65)
                );
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "augassign"


    public static class print_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "print_stmt"
    // Python.g:188:1: print_stmt : 'print' ( testlist | RIGHTSHIFT testlist )? ;
    public final PythonParser.print_stmt_return print_stmt() throws RecognitionException {
        PythonParser.print_stmt_return retval = new PythonParser.print_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal66=null;
        Token RIGHTSHIFT68=null;
        PythonParser.testlist_return testlist67 =null;

        PythonParser.testlist_return testlist69 =null;


        CommonTree string_literal66_tree=null;
        CommonTree RIGHTSHIFT68_tree=null;

        try {
            // Python.g:188:11: ( 'print' ( testlist | RIGHTSHIFT testlist )? )
            // Python.g:189:9: 'print' ( testlist | RIGHTSHIFT testlist )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal66=(Token)match(input,107,FOLLOW_107_in_print_stmt888); 
            string_literal66_tree = 
            (CommonTree)adaptor.create(string_literal66)
            ;
            adaptor.addChild(root_0, string_literal66_tree);


            // Python.g:190:9: ( testlist | RIGHTSHIFT testlist )?
            int alt22=3;
            int LA22_0 = input.LA(1);

            if ( (LA22_0==BACKQUOTE||LA22_0==COMPLEX||LA22_0==FLOAT||(LA22_0 >= INT && LA22_0 <= LCURLY)||(LA22_0 >= LONGINT && LA22_0 <= MINUS)||LA22_0==NAME||LA22_0==PLUS||LA22_0==STRING||LA22_0==TILDE||(LA22_0 >= 103 && LA22_0 <= 104)) ) {
                alt22=1;
            }
            else if ( (LA22_0==RIGHTSHIFT) ) {
                alt22=2;
            }
            switch (alt22) {
                case 1 :
                    // Python.g:190:13: testlist
                    {
                    pushFollow(FOLLOW_testlist_in_print_stmt902);
                    testlist67=testlist();

                    state._fsp--;

                    adaptor.addChild(root_0, testlist67.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:191:13: RIGHTSHIFT testlist
                    {
                    RIGHTSHIFT68=(Token)match(input,RIGHTSHIFT,FOLLOW_RIGHTSHIFT_in_print_stmt916); 
                    RIGHTSHIFT68_tree = 
                    (CommonTree)adaptor.create(RIGHTSHIFT68)
                    ;
                    adaptor.addChild(root_0, RIGHTSHIFT68_tree);


                    pushFollow(FOLLOW_testlist_in_print_stmt918);
                    testlist69=testlist();

                    state._fsp--;

                    adaptor.addChild(root_0, testlist69.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "print_stmt"


    public static class del_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "del_stmt"
    // Python.g:195:1: del_stmt : 'del' exprlist ;
    public final PythonParser.del_stmt_return del_stmt() throws RecognitionException {
        PythonParser.del_stmt_return retval = new PythonParser.del_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal70=null;
        PythonParser.exprlist_return exprlist71 =null;


        CommonTree string_literal70_tree=null;

        try {
            // Python.g:195:9: ( 'del' exprlist )
            // Python.g:195:11: 'del' exprlist
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal70=(Token)match(input,90,FOLLOW_90_in_del_stmt938); 
            string_literal70_tree = 
            (CommonTree)adaptor.create(string_literal70)
            ;
            adaptor.addChild(root_0, string_literal70_tree);


            pushFollow(FOLLOW_exprlist_in_del_stmt940);
            exprlist71=exprlist();

            state._fsp--;

            adaptor.addChild(root_0, exprlist71.getTree());

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "del_stmt"


    public static class pass_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "pass_stmt"
    // Python.g:198:1: pass_stmt : 'pass' ;
    public final PythonParser.pass_stmt_return pass_stmt() throws RecognitionException {
        PythonParser.pass_stmt_return retval = new PythonParser.pass_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal72=null;

        CommonTree string_literal72_tree=null;

        try {
            // Python.g:198:10: ( 'pass' )
            // Python.g:198:12: 'pass'
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal72=(Token)match(input,106,FOLLOW_106_in_pass_stmt949); 
            string_literal72_tree = 
            (CommonTree)adaptor.create(string_literal72)
            ;
            adaptor.addChild(root_0, string_literal72_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "pass_stmt"


    public static class flow_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "flow_stmt"
    // Python.g:201:1: flow_stmt : ( break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt );
    public final PythonParser.flow_stmt_return flow_stmt() throws RecognitionException {
        PythonParser.flow_stmt_return retval = new PythonParser.flow_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.break_stmt_return break_stmt73 =null;

        PythonParser.continue_stmt_return continue_stmt74 =null;

        PythonParser.return_stmt_return return_stmt75 =null;

        PythonParser.raise_stmt_return raise_stmt76 =null;

        PythonParser.yield_stmt_return yield_stmt77 =null;



        try {
            // Python.g:201:10: ( break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt )
            int alt23=5;
            switch ( input.LA(1) ) {
            case 86:
                {
                alt23=1;
                }
                break;
            case 88:
                {
                alt23=2;
                }
                break;
            case 109:
                {
                alt23=3;
                }
                break;
            case 108:
                {
                alt23=4;
                }
                break;
            case 112:
                {
                alt23=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 23, 0, input);

                throw nvae;

            }

            switch (alt23) {
                case 1 :
                    // Python.g:201:12: break_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_break_stmt_in_flow_stmt958);
                    break_stmt73=break_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, break_stmt73.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:202:4: continue_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_continue_stmt_in_flow_stmt963);
                    continue_stmt74=continue_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, continue_stmt74.getTree());

                    }
                    break;
                case 3 :
                    // Python.g:203:4: return_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_return_stmt_in_flow_stmt968);
                    return_stmt75=return_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, return_stmt75.getTree());

                    }
                    break;
                case 4 :
                    // Python.g:204:4: raise_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_raise_stmt_in_flow_stmt974);
                    raise_stmt76=raise_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, raise_stmt76.getTree());

                    }
                    break;
                case 5 :
                    // Python.g:205:4: yield_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_yield_stmt_in_flow_stmt979);
                    yield_stmt77=yield_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, yield_stmt77.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "flow_stmt"


    public static class break_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "break_stmt"
    // Python.g:208:1: break_stmt : 'break' ;
    public final PythonParser.break_stmt_return break_stmt() throws RecognitionException {
        PythonParser.break_stmt_return retval = new PythonParser.break_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal78=null;

        CommonTree string_literal78_tree=null;

        try {
            // Python.g:208:11: ( 'break' )
            // Python.g:208:13: 'break'
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal78=(Token)match(input,86,FOLLOW_86_in_break_stmt988); 
            string_literal78_tree = 
            (CommonTree)adaptor.create(string_literal78)
            ;
            adaptor.addChild(root_0, string_literal78_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "break_stmt"


    public static class continue_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "continue_stmt"
    // Python.g:211:1: continue_stmt : 'continue' ;
    public final PythonParser.continue_stmt_return continue_stmt() throws RecognitionException {
        PythonParser.continue_stmt_return retval = new PythonParser.continue_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal79=null;

        CommonTree string_literal79_tree=null;

        try {
            // Python.g:211:14: ( 'continue' )
            // Python.g:211:16: 'continue'
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal79=(Token)match(input,88,FOLLOW_88_in_continue_stmt997); 
            string_literal79_tree = 
            (CommonTree)adaptor.create(string_literal79)
            ;
            adaptor.addChild(root_0, string_literal79_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "continue_stmt"


    public static class return_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "return_stmt"
    // Python.g:214:1: return_stmt : 'return' ( testlist )? -> ^( RETURN_STATMENT 'return' ( testlist )? ) ;
    public final PythonParser.return_stmt_return return_stmt() throws RecognitionException {
        PythonParser.return_stmt_return retval = new PythonParser.return_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal80=null;
        PythonParser.testlist_return testlist81 =null;


        CommonTree string_literal80_tree=null;
        RewriteRuleTokenStream stream_109=new RewriteRuleTokenStream(adaptor,"token 109");
        RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,"rule testlist");
        try {
            // Python.g:214:12: ( 'return' ( testlist )? -> ^( RETURN_STATMENT 'return' ( testlist )? ) )
            // Python.g:214:14: 'return' ( testlist )?
            {
            string_literal80=(Token)match(input,109,FOLLOW_109_in_return_stmt1006);  
            stream_109.add(string_literal80);


            // Python.g:214:23: ( testlist )?
            int alt24=2;
            int LA24_0 = input.LA(1);

            if ( (LA24_0==BACKQUOTE||LA24_0==COMPLEX||LA24_0==FLOAT||(LA24_0 >= INT && LA24_0 <= LCURLY)||(LA24_0 >= LONGINT && LA24_0 <= MINUS)||LA24_0==NAME||LA24_0==PLUS||LA24_0==STRING||LA24_0==TILDE||(LA24_0 >= 103 && LA24_0 <= 104)) ) {
                alt24=1;
            }
            switch (alt24) {
                case 1 :
                    // Python.g:214:24: testlist
                    {
                    pushFollow(FOLLOW_testlist_in_return_stmt1009);
                    testlist81=testlist();

                    state._fsp--;

                    stream_testlist.add(testlist81.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: 109, testlist
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 214:35: -> ^( RETURN_STATMENT 'return' ( testlist )? )
            {
                // Python.g:214:38: ^( RETURN_STATMENT 'return' ( testlist )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(RETURN_STATMENT, "RETURN_STATMENT")
                , root_1);

                adaptor.addChild(root_1, 
                stream_109.nextNode()
                );

                // Python.g:214:65: ( testlist )?
                if ( stream_testlist.hasNext() ) {
                    adaptor.addChild(root_1, stream_testlist.nextTree());

                }
                stream_testlist.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "return_stmt"


    public static class yield_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "yield_stmt"
    // Python.g:217:1: yield_stmt : 'yield' testlist ;
    public final PythonParser.yield_stmt_return yield_stmt() throws RecognitionException {
        PythonParser.yield_stmt_return retval = new PythonParser.yield_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal82=null;
        PythonParser.testlist_return testlist83 =null;


        CommonTree string_literal82_tree=null;

        try {
            // Python.g:217:11: ( 'yield' testlist )
            // Python.g:217:13: 'yield' testlist
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal82=(Token)match(input,112,FOLLOW_112_in_yield_stmt1033); 
            string_literal82_tree = 
            (CommonTree)adaptor.create(string_literal82)
            ;
            adaptor.addChild(root_0, string_literal82_tree);


            pushFollow(FOLLOW_testlist_in_yield_stmt1035);
            testlist83=testlist();

            state._fsp--;

            adaptor.addChild(root_0, testlist83.getTree());

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "yield_stmt"


    public static class raise_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "raise_stmt"
    // Python.g:220:1: raise_stmt : 'raise' ( test ( COMMA test ( COMMA test )? )? )? ;
    public final PythonParser.raise_stmt_return raise_stmt() throws RecognitionException {
        PythonParser.raise_stmt_return retval = new PythonParser.raise_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal84=null;
        Token COMMA86=null;
        Token COMMA88=null;
        PythonParser.test_return test85 =null;

        PythonParser.test_return test87 =null;

        PythonParser.test_return test89 =null;


        CommonTree string_literal84_tree=null;
        CommonTree COMMA86_tree=null;
        CommonTree COMMA88_tree=null;

        try {
            // Python.g:220:11: ( 'raise' ( test ( COMMA test ( COMMA test )? )? )? )
            // Python.g:220:13: 'raise' ( test ( COMMA test ( COMMA test )? )? )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal84=(Token)match(input,108,FOLLOW_108_in_raise_stmt1044); 
            string_literal84_tree = 
            (CommonTree)adaptor.create(string_literal84)
            ;
            adaptor.addChild(root_0, string_literal84_tree);


            // Python.g:220:21: ( test ( COMMA test ( COMMA test )? )? )?
            int alt27=2;
            int LA27_0 = input.LA(1);

            if ( (LA27_0==BACKQUOTE||LA27_0==COMPLEX||LA27_0==FLOAT||(LA27_0 >= INT && LA27_0 <= LCURLY)||(LA27_0 >= LONGINT && LA27_0 <= MINUS)||LA27_0==NAME||LA27_0==PLUS||LA27_0==STRING||LA27_0==TILDE||(LA27_0 >= 103 && LA27_0 <= 104)) ) {
                alt27=1;
            }
            switch (alt27) {
                case 1 :
                    // Python.g:220:22: test ( COMMA test ( COMMA test )? )?
                    {
                    pushFollow(FOLLOW_test_in_raise_stmt1047);
                    test85=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test85.getTree());

                    // Python.g:220:27: ( COMMA test ( COMMA test )? )?
                    int alt26=2;
                    int LA26_0 = input.LA(1);

                    if ( (LA26_0==COMMA) ) {
                        alt26=1;
                    }
                    switch (alt26) {
                        case 1 :
                            // Python.g:220:28: COMMA test ( COMMA test )?
                            {
                            COMMA86=(Token)match(input,COMMA,FOLLOW_COMMA_in_raise_stmt1050); 
                            COMMA86_tree = 
                            (CommonTree)adaptor.create(COMMA86)
                            ;
                            adaptor.addChild(root_0, COMMA86_tree);


                            pushFollow(FOLLOW_test_in_raise_stmt1052);
                            test87=test();

                            state._fsp--;

                            adaptor.addChild(root_0, test87.getTree());

                            // Python.g:220:39: ( COMMA test )?
                            int alt25=2;
                            int LA25_0 = input.LA(1);

                            if ( (LA25_0==COMMA) ) {
                                alt25=1;
                            }
                            switch (alt25) {
                                case 1 :
                                    // Python.g:220:40: COMMA test
                                    {
                                    COMMA88=(Token)match(input,COMMA,FOLLOW_COMMA_in_raise_stmt1055); 
                                    COMMA88_tree = 
                                    (CommonTree)adaptor.create(COMMA88)
                                    ;
                                    adaptor.addChild(root_0, COMMA88_tree);


                                    pushFollow(FOLLOW_test_in_raise_stmt1057);
                                    test89=test();

                                    state._fsp--;

                                    adaptor.addChild(root_0, test89.getTree());

                                    }
                                    break;

                            }


                            }
                            break;

                    }


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "raise_stmt"


    public static class import_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "import_stmt"
    // Python.g:223:1: import_stmt : ( 'import' a= dotted_as_name ( COMMA b= dotted_as_name )* -> ^( IMPORT_STATMENT $a ( $b)* ) | 'from' dotted_name 'import' ( STAR | import_as_name ( COMMA import_as_name )* ) );
    public final PythonParser.import_stmt_return import_stmt() throws RecognitionException {
        PythonParser.import_stmt_return retval = new PythonParser.import_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal90=null;
        Token COMMA91=null;
        Token string_literal92=null;
        Token string_literal94=null;
        Token STAR95=null;
        Token COMMA97=null;
        PythonParser.dotted_as_name_return a =null;

        PythonParser.dotted_as_name_return b =null;

        PythonParser.dotted_name_return dotted_name93 =null;

        PythonParser.import_as_name_return import_as_name96 =null;

        PythonParser.import_as_name_return import_as_name98 =null;


        CommonTree string_literal90_tree=null;
        CommonTree COMMA91_tree=null;
        CommonTree string_literal92_tree=null;
        CommonTree string_literal94_tree=null;
        CommonTree STAR95_tree=null;
        CommonTree COMMA97_tree=null;
        RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleTokenStream stream_100=new RewriteRuleTokenStream(adaptor,"token 100");
        RewriteRuleSubtreeStream stream_dotted_as_name=new RewriteRuleSubtreeStream(adaptor,"rule dotted_as_name");
        try {
            // Python.g:224:5: ( 'import' a= dotted_as_name ( COMMA b= dotted_as_name )* -> ^( IMPORT_STATMENT $a ( $b)* ) | 'from' dotted_name 'import' ( STAR | import_as_name ( COMMA import_as_name )* ) )
            int alt31=2;
            int LA31_0 = input.LA(1);

            if ( (LA31_0==100) ) {
                alt31=1;
            }
            else if ( (LA31_0==97) ) {
                alt31=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 31, 0, input);

                throw nvae;

            }
            switch (alt31) {
                case 1 :
                    // Python.g:224:9: 'import' a= dotted_as_name ( COMMA b= dotted_as_name )*
                    {
                    string_literal90=(Token)match(input,100,FOLLOW_100_in_import_stmt1079);  
                    stream_100.add(string_literal90);


                    pushFollow(FOLLOW_dotted_as_name_in_import_stmt1083);
                    a=dotted_as_name();

                    state._fsp--;

                    stream_dotted_as_name.add(a.getTree());

                    // Python.g:224:35: ( COMMA b= dotted_as_name )*
                    loop28:
                    do {
                        int alt28=2;
                        int LA28_0 = input.LA(1);

                        if ( (LA28_0==COMMA) ) {
                            alt28=1;
                        }


                        switch (alt28) {
                    	case 1 :
                    	    // Python.g:224:36: COMMA b= dotted_as_name
                    	    {
                    	    COMMA91=(Token)match(input,COMMA,FOLLOW_COMMA_in_import_stmt1086);  
                    	    stream_COMMA.add(COMMA91);


                    	    pushFollow(FOLLOW_dotted_as_name_in_import_stmt1090);
                    	    b=dotted_as_name();

                    	    state._fsp--;

                    	    stream_dotted_as_name.add(b.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop28;
                        }
                    } while (true);


                    // AST REWRITE
                    // elements: a, b
                    // token labels: 
                    // rule labels: retval, b, a
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.tree:null);
                    RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"rule a",a!=null?a.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 225:6: -> ^( IMPORT_STATMENT $a ( $b)* )
                    {
                        // Python.g:225:9: ^( IMPORT_STATMENT $a ( $b)* )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        (CommonTree)adaptor.create(IMPORT_STATMENT, "IMPORT_STATMENT")
                        , root_1);

                        adaptor.addChild(root_1, stream_a.nextTree());

                        // Python.g:225:30: ( $b)*
                        while ( stream_b.hasNext() ) {
                            adaptor.addChild(root_1, stream_b.nextTree());

                        }
                        stream_b.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;
                case 2 :
                    // Python.g:226:6: 'from' dotted_name 'import' ( STAR | import_as_name ( COMMA import_as_name )* )
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal92=(Token)match(input,97,FOLLOW_97_in_import_stmt1120); 
                    string_literal92_tree = 
                    (CommonTree)adaptor.create(string_literal92)
                    ;
                    adaptor.addChild(root_0, string_literal92_tree);


                    pushFollow(FOLLOW_dotted_name_in_import_stmt1122);
                    dotted_name93=dotted_name();

                    state._fsp--;

                    adaptor.addChild(root_0, dotted_name93.getTree());

                    string_literal94=(Token)match(input,100,FOLLOW_100_in_import_stmt1124); 
                    string_literal94_tree = 
                    (CommonTree)adaptor.create(string_literal94)
                    ;
                    adaptor.addChild(root_0, string_literal94_tree);


                    // Python.g:227:9: ( STAR | import_as_name ( COMMA import_as_name )* )
                    int alt30=2;
                    int LA30_0 = input.LA(1);

                    if ( (LA30_0==STAR) ) {
                        alt30=1;
                    }
                    else if ( (LA30_0==NAME) ) {
                        alt30=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 30, 0, input);

                        throw nvae;

                    }
                    switch (alt30) {
                        case 1 :
                            // Python.g:227:10: STAR
                            {
                            STAR95=(Token)match(input,STAR,FOLLOW_STAR_in_import_stmt1135); 
                            STAR95_tree = 
                            (CommonTree)adaptor.create(STAR95)
                            ;
                            adaptor.addChild(root_0, STAR95_tree);


                            }
                            break;
                        case 2 :
                            // Python.g:227:17: import_as_name ( COMMA import_as_name )*
                            {
                            pushFollow(FOLLOW_import_as_name_in_import_stmt1139);
                            import_as_name96=import_as_name();

                            state._fsp--;

                            adaptor.addChild(root_0, import_as_name96.getTree());

                            // Python.g:227:32: ( COMMA import_as_name )*
                            loop29:
                            do {
                                int alt29=2;
                                int LA29_0 = input.LA(1);

                                if ( (LA29_0==COMMA) ) {
                                    alt29=1;
                                }


                                switch (alt29) {
                            	case 1 :
                            	    // Python.g:227:33: COMMA import_as_name
                            	    {
                            	    COMMA97=(Token)match(input,COMMA,FOLLOW_COMMA_in_import_stmt1142); 
                            	    COMMA97_tree = 
                            	    (CommonTree)adaptor.create(COMMA97)
                            	    ;
                            	    adaptor.addChild(root_0, COMMA97_tree);


                            	    pushFollow(FOLLOW_import_as_name_in_import_stmt1144);
                            	    import_as_name98=import_as_name();

                            	    state._fsp--;

                            	    adaptor.addChild(root_0, import_as_name98.getTree());

                            	    }
                            	    break;

                            	default :
                            	    break loop29;
                                }
                            } while (true);


                            }
                            break;

                    }


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "import_stmt"


    public static class import_as_name_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "import_as_name"
    // Python.g:230:1: import_as_name : NAME ( NAME NAME )? ;
    public final PythonParser.import_as_name_return import_as_name() throws RecognitionException {
        PythonParser.import_as_name_return retval = new PythonParser.import_as_name_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NAME99=null;
        Token NAME100=null;
        Token NAME101=null;

        CommonTree NAME99_tree=null;
        CommonTree NAME100_tree=null;
        CommonTree NAME101_tree=null;

        try {
            // Python.g:231:5: ( NAME ( NAME NAME )? )
            // Python.g:231:9: NAME ( NAME NAME )?
            {
            root_0 = (CommonTree)adaptor.nil();


            NAME99=(Token)match(input,NAME,FOLLOW_NAME_in_import_as_name1163); 
            NAME99_tree = 
            (CommonTree)adaptor.create(NAME99)
            ;
            adaptor.addChild(root_0, NAME99_tree);


            // Python.g:231:14: ( NAME NAME )?
            int alt32=2;
            int LA32_0 = input.LA(1);

            if ( (LA32_0==NAME) ) {
                alt32=1;
            }
            switch (alt32) {
                case 1 :
                    // Python.g:231:15: NAME NAME
                    {
                    NAME100=(Token)match(input,NAME,FOLLOW_NAME_in_import_as_name1166); 
                    NAME100_tree = 
                    (CommonTree)adaptor.create(NAME100)
                    ;
                    adaptor.addChild(root_0, NAME100_tree);


                    NAME101=(Token)match(input,NAME,FOLLOW_NAME_in_import_as_name1168); 
                    NAME101_tree = 
                    (CommonTree)adaptor.create(NAME101)
                    ;
                    adaptor.addChild(root_0, NAME101_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "import_as_name"


    public static class dotted_as_name_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "dotted_as_name"
    // Python.g:234:1: dotted_as_name : dotted_name ( NAME NAME )? ;
    public final PythonParser.dotted_as_name_return dotted_as_name() throws RecognitionException {
        PythonParser.dotted_as_name_return retval = new PythonParser.dotted_as_name_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NAME103=null;
        Token NAME104=null;
        PythonParser.dotted_name_return dotted_name102 =null;


        CommonTree NAME103_tree=null;
        CommonTree NAME104_tree=null;

        try {
            // Python.g:234:15: ( dotted_name ( NAME NAME )? )
            // Python.g:234:17: dotted_name ( NAME NAME )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_dotted_name_in_dotted_as_name1179);
            dotted_name102=dotted_name();

            state._fsp--;

            adaptor.addChild(root_0, dotted_name102.getTree());

            // Python.g:234:29: ( NAME NAME )?
            int alt33=2;
            int LA33_0 = input.LA(1);

            if ( (LA33_0==NAME) ) {
                alt33=1;
            }
            switch (alt33) {
                case 1 :
                    // Python.g:234:30: NAME NAME
                    {
                    NAME103=(Token)match(input,NAME,FOLLOW_NAME_in_dotted_as_name1182); 
                    NAME103_tree = 
                    (CommonTree)adaptor.create(NAME103)
                    ;
                    adaptor.addChild(root_0, NAME103_tree);


                    NAME104=(Token)match(input,NAME,FOLLOW_NAME_in_dotted_as_name1184); 
                    NAME104_tree = 
                    (CommonTree)adaptor.create(NAME104)
                    ;
                    adaptor.addChild(root_0, NAME104_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "dotted_as_name"


    public static class dotted_name_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "dotted_name"
    // Python.g:237:1: dotted_name : NAME ( DOT NAME )* ;
    public final PythonParser.dotted_name_return dotted_name() throws RecognitionException {
        PythonParser.dotted_name_return retval = new PythonParser.dotted_name_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NAME105=null;
        Token DOT106=null;
        Token NAME107=null;

        CommonTree NAME105_tree=null;
        CommonTree DOT106_tree=null;
        CommonTree NAME107_tree=null;

        try {
            // Python.g:237:12: ( NAME ( DOT NAME )* )
            // Python.g:237:14: NAME ( DOT NAME )*
            {
            root_0 = (CommonTree)adaptor.nil();


            NAME105=(Token)match(input,NAME,FOLLOW_NAME_in_dotted_name1195); 
            NAME105_tree = 
            (CommonTree)adaptor.create(NAME105)
            ;
            adaptor.addChild(root_0, NAME105_tree);


            // Python.g:237:19: ( DOT NAME )*
            loop34:
            do {
                int alt34=2;
                int LA34_0 = input.LA(1);

                if ( (LA34_0==DOT) ) {
                    alt34=1;
                }


                switch (alt34) {
            	case 1 :
            	    // Python.g:237:20: DOT NAME
            	    {
            	    DOT106=(Token)match(input,DOT,FOLLOW_DOT_in_dotted_name1198); 
            	    DOT106_tree = 
            	    (CommonTree)adaptor.create(DOT106)
            	    ;
            	    adaptor.addChild(root_0, DOT106_tree);


            	    NAME107=(Token)match(input,NAME,FOLLOW_NAME_in_dotted_name1200); 
            	    NAME107_tree = 
            	    (CommonTree)adaptor.create(NAME107)
            	    ;
            	    adaptor.addChild(root_0, NAME107_tree);


            	    }
            	    break;

            	default :
            	    break loop34;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "dotted_name"


    public static class global_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "global_stmt"
    // Python.g:240:1: global_stmt : 'global' NAME ( COMMA NAME )* ;
    public final PythonParser.global_stmt_return global_stmt() throws RecognitionException {
        PythonParser.global_stmt_return retval = new PythonParser.global_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal108=null;
        Token NAME109=null;
        Token COMMA110=null;
        Token NAME111=null;

        CommonTree string_literal108_tree=null;
        CommonTree NAME109_tree=null;
        CommonTree COMMA110_tree=null;
        CommonTree NAME111_tree=null;

        try {
            // Python.g:240:12: ( 'global' NAME ( COMMA NAME )* )
            // Python.g:240:14: 'global' NAME ( COMMA NAME )*
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal108=(Token)match(input,98,FOLLOW_98_in_global_stmt1211); 
            string_literal108_tree = 
            (CommonTree)adaptor.create(string_literal108)
            ;
            adaptor.addChild(root_0, string_literal108_tree);


            NAME109=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt1213); 
            NAME109_tree = 
            (CommonTree)adaptor.create(NAME109)
            ;
            adaptor.addChild(root_0, NAME109_tree);


            // Python.g:240:28: ( COMMA NAME )*
            loop35:
            do {
                int alt35=2;
                int LA35_0 = input.LA(1);

                if ( (LA35_0==COMMA) ) {
                    alt35=1;
                }


                switch (alt35) {
            	case 1 :
            	    // Python.g:240:29: COMMA NAME
            	    {
            	    COMMA110=(Token)match(input,COMMA,FOLLOW_COMMA_in_global_stmt1216); 
            	    COMMA110_tree = 
            	    (CommonTree)adaptor.create(COMMA110)
            	    ;
            	    adaptor.addChild(root_0, COMMA110_tree);


            	    NAME111=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt1218); 
            	    NAME111_tree = 
            	    (CommonTree)adaptor.create(NAME111)
            	    ;
            	    adaptor.addChild(root_0, NAME111_tree);


            	    }
            	    break;

            	default :
            	    break loop35;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "global_stmt"


    public static class exec_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "exec_stmt"
    // Python.g:243:1: exec_stmt : 'exec' expr ( 'in' test ( COMMA test )? )? ;
    public final PythonParser.exec_stmt_return exec_stmt() throws RecognitionException {
        PythonParser.exec_stmt_return retval = new PythonParser.exec_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal112=null;
        Token string_literal114=null;
        Token COMMA116=null;
        PythonParser.expr_return expr113 =null;

        PythonParser.test_return test115 =null;

        PythonParser.test_return test117 =null;


        CommonTree string_literal112_tree=null;
        CommonTree string_literal114_tree=null;
        CommonTree COMMA116_tree=null;

        try {
            // Python.g:243:10: ( 'exec' expr ( 'in' test ( COMMA test )? )? )
            // Python.g:243:12: 'exec' expr ( 'in' test ( COMMA test )? )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal112=(Token)match(input,94,FOLLOW_94_in_exec_stmt1229); 
            string_literal112_tree = 
            (CommonTree)adaptor.create(string_literal112)
            ;
            adaptor.addChild(root_0, string_literal112_tree);


            pushFollow(FOLLOW_expr_in_exec_stmt1231);
            expr113=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr113.getTree());

            // Python.g:243:24: ( 'in' test ( COMMA test )? )?
            int alt37=2;
            int LA37_0 = input.LA(1);

            if ( (LA37_0==101) ) {
                alt37=1;
            }
            switch (alt37) {
                case 1 :
                    // Python.g:243:25: 'in' test ( COMMA test )?
                    {
                    string_literal114=(Token)match(input,101,FOLLOW_101_in_exec_stmt1234); 
                    string_literal114_tree = 
                    (CommonTree)adaptor.create(string_literal114)
                    ;
                    adaptor.addChild(root_0, string_literal114_tree);


                    pushFollow(FOLLOW_test_in_exec_stmt1236);
                    test115=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test115.getTree());

                    // Python.g:243:35: ( COMMA test )?
                    int alt36=2;
                    int LA36_0 = input.LA(1);

                    if ( (LA36_0==COMMA) ) {
                        alt36=1;
                    }
                    switch (alt36) {
                        case 1 :
                            // Python.g:243:36: COMMA test
                            {
                            COMMA116=(Token)match(input,COMMA,FOLLOW_COMMA_in_exec_stmt1239); 
                            COMMA116_tree = 
                            (CommonTree)adaptor.create(COMMA116)
                            ;
                            adaptor.addChild(root_0, COMMA116_tree);


                            pushFollow(FOLLOW_test_in_exec_stmt1241);
                            test117=test();

                            state._fsp--;

                            adaptor.addChild(root_0, test117.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "exec_stmt"


    public static class assert_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "assert_stmt"
    // Python.g:246:1: assert_stmt : 'assert' test ( COMMA test )? ;
    public final PythonParser.assert_stmt_return assert_stmt() throws RecognitionException {
        PythonParser.assert_stmt_return retval = new PythonParser.assert_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal118=null;
        Token COMMA120=null;
        PythonParser.test_return test119 =null;

        PythonParser.test_return test121 =null;


        CommonTree string_literal118_tree=null;
        CommonTree COMMA120_tree=null;

        try {
            // Python.g:246:12: ( 'assert' test ( COMMA test )? )
            // Python.g:246:14: 'assert' test ( COMMA test )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal118=(Token)match(input,85,FOLLOW_85_in_assert_stmt1254); 
            string_literal118_tree = 
            (CommonTree)adaptor.create(string_literal118)
            ;
            adaptor.addChild(root_0, string_literal118_tree);


            pushFollow(FOLLOW_test_in_assert_stmt1256);
            test119=test();

            state._fsp--;

            adaptor.addChild(root_0, test119.getTree());

            // Python.g:246:28: ( COMMA test )?
            int alt38=2;
            int LA38_0 = input.LA(1);

            if ( (LA38_0==COMMA) ) {
                alt38=1;
            }
            switch (alt38) {
                case 1 :
                    // Python.g:246:29: COMMA test
                    {
                    COMMA120=(Token)match(input,COMMA,FOLLOW_COMMA_in_assert_stmt1259); 
                    COMMA120_tree = 
                    (CommonTree)adaptor.create(COMMA120)
                    ;
                    adaptor.addChild(root_0, COMMA120_tree);


                    pushFollow(FOLLOW_test_in_assert_stmt1261);
                    test121=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test121.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "assert_stmt"


    public static class compound_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "compound_stmt"
    // Python.g:250:1: compound_stmt : ( if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef );
    public final PythonParser.compound_stmt_return compound_stmt() throws RecognitionException {
        PythonParser.compound_stmt_return retval = new PythonParser.compound_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.if_stmt_return if_stmt122 =null;

        PythonParser.while_stmt_return while_stmt123 =null;

        PythonParser.for_stmt_return for_stmt124 =null;

        PythonParser.try_stmt_return try_stmt125 =null;

        PythonParser.funcdef_return funcdef126 =null;

        PythonParser.classdef_return classdef127 =null;



        try {
            // Python.g:250:14: ( if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef )
            int alt39=6;
            switch ( input.LA(1) ) {
            case 99:
                {
                alt39=1;
                }
                break;
            case 111:
                {
                alt39=2;
                }
                break;
            case 96:
                {
                alt39=3;
                }
                break;
            case 110:
                {
                alt39=4;
                }
                break;
            case 89:
                {
                alt39=5;
                }
                break;
            case 87:
                {
                alt39=6;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 39, 0, input);

                throw nvae;

            }

            switch (alt39) {
                case 1 :
                    // Python.g:250:16: if_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_if_stmt_in_compound_stmt1273);
                    if_stmt122=if_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, if_stmt122.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:251:4: while_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_while_stmt_in_compound_stmt1278);
                    while_stmt123=while_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, while_stmt123.getTree());

                    }
                    break;
                case 3 :
                    // Python.g:252:4: for_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_for_stmt_in_compound_stmt1283);
                    for_stmt124=for_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, for_stmt124.getTree());

                    }
                    break;
                case 4 :
                    // Python.g:253:4: try_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_try_stmt_in_compound_stmt1288);
                    try_stmt125=try_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, try_stmt125.getTree());

                    }
                    break;
                case 5 :
                    // Python.g:254:4: funcdef
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_funcdef_in_compound_stmt1293);
                    funcdef126=funcdef();

                    state._fsp--;

                    adaptor.addChild(root_0, funcdef126.getTree());

                    }
                    break;
                case 6 :
                    // Python.g:255:4: classdef
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_classdef_in_compound_stmt1298);
                    classdef127=classdef();

                    state._fsp--;

                    adaptor.addChild(root_0, classdef127.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "compound_stmt"


    public static class if_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "if_stmt"
    // Python.g:258:1: if_stmt : 'if' at= test COLON as= suite ( 'elif' bt= test COLON bs= suite )* ( 'else' COLON cs= suite )? -> ^( IF_STATMENT 'if' $at $as ( 'elif' $bt $bs)* ( 'else' $cs)? ) ;
    public final PythonParser.if_stmt_return if_stmt() throws RecognitionException {
        PythonParser.if_stmt_return retval = new PythonParser.if_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal128=null;
        Token COLON129=null;
        Token string_literal130=null;
        Token COLON131=null;
        Token string_literal132=null;
        Token COLON133=null;
        PythonParser.test_return at =null;

        PythonParser.suite_return as =null;

        PythonParser.test_return bt =null;

        PythonParser.suite_return bs =null;

        PythonParser.suite_return cs =null;


        CommonTree string_literal128_tree=null;
        CommonTree COLON129_tree=null;
        CommonTree string_literal130_tree=null;
        CommonTree COLON131_tree=null;
        CommonTree string_literal132_tree=null;
        CommonTree COLON133_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,"token 92");
        RewriteRuleTokenStream stream_91=new RewriteRuleTokenStream(adaptor,"token 91");
        RewriteRuleTokenStream stream_99=new RewriteRuleTokenStream(adaptor,"token 99");
        RewriteRuleSubtreeStream stream_test=new RewriteRuleSubtreeStream(adaptor,"rule test");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        try {
            // Python.g:258:8: ( 'if' at= test COLON as= suite ( 'elif' bt= test COLON bs= suite )* ( 'else' COLON cs= suite )? -> ^( IF_STATMENT 'if' $at $as ( 'elif' $bt $bs)* ( 'else' $cs)? ) )
            // Python.g:258:10: 'if' at= test COLON as= suite ( 'elif' bt= test COLON bs= suite )* ( 'else' COLON cs= suite )?
            {
            string_literal128=(Token)match(input,99,FOLLOW_99_in_if_stmt1307);  
            stream_99.add(string_literal128);


            pushFollow(FOLLOW_test_in_if_stmt1311);
            at=test();

            state._fsp--;

            stream_test.add(at.getTree());

            COLON129=(Token)match(input,COLON,FOLLOW_COLON_in_if_stmt1313);  
            stream_COLON.add(COLON129);


            pushFollow(FOLLOW_suite_in_if_stmt1317);
            as=suite();

            state._fsp--;

            stream_suite.add(as.getTree());

            // Python.g:258:38: ( 'elif' bt= test COLON bs= suite )*
            loop40:
            do {
                int alt40=2;
                int LA40_0 = input.LA(1);

                if ( (LA40_0==91) ) {
                    alt40=1;
                }


                switch (alt40) {
            	case 1 :
            	    // Python.g:258:39: 'elif' bt= test COLON bs= suite
            	    {
            	    string_literal130=(Token)match(input,91,FOLLOW_91_in_if_stmt1320);  
            	    stream_91.add(string_literal130);


            	    pushFollow(FOLLOW_test_in_if_stmt1324);
            	    bt=test();

            	    state._fsp--;

            	    stream_test.add(bt.getTree());

            	    COLON131=(Token)match(input,COLON,FOLLOW_COLON_in_if_stmt1326);  
            	    stream_COLON.add(COLON131);


            	    pushFollow(FOLLOW_suite_in_if_stmt1330);
            	    bs=suite();

            	    state._fsp--;

            	    stream_suite.add(bs.getTree());

            	    }
            	    break;

            	default :
            	    break loop40;
                }
            } while (true);


            // Python.g:258:71: ( 'else' COLON cs= suite )?
            int alt41=2;
            int LA41_0 = input.LA(1);

            if ( (LA41_0==92) ) {
                alt41=1;
            }
            switch (alt41) {
                case 1 :
                    // Python.g:258:72: 'else' COLON cs= suite
                    {
                    string_literal132=(Token)match(input,92,FOLLOW_92_in_if_stmt1335);  
                    stream_92.add(string_literal132);


                    COLON133=(Token)match(input,COLON,FOLLOW_COLON_in_if_stmt1337);  
                    stream_COLON.add(COLON133);


                    pushFollow(FOLLOW_suite_in_if_stmt1341);
                    cs=suite();

                    state._fsp--;

                    stream_suite.add(cs.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: bs, at, 91, bt, cs, 92, 99, as
            // token labels: 
            // rule labels: retval, at, as, bs, cs, bt
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_at=new RewriteRuleSubtreeStream(adaptor,"rule at",at!=null?at.tree:null);
            RewriteRuleSubtreeStream stream_as=new RewriteRuleSubtreeStream(adaptor,"rule as",as!=null?as.tree:null);
            RewriteRuleSubtreeStream stream_bs=new RewriteRuleSubtreeStream(adaptor,"rule bs",bs!=null?bs.tree:null);
            RewriteRuleSubtreeStream stream_cs=new RewriteRuleSubtreeStream(adaptor,"rule cs",cs!=null?cs.tree:null);
            RewriteRuleSubtreeStream stream_bt=new RewriteRuleSubtreeStream(adaptor,"rule bt",bt!=null?bt.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 259:2: -> ^( IF_STATMENT 'if' $at $as ( 'elif' $bt $bs)* ( 'else' $cs)? )
            {
                // Python.g:259:5: ^( IF_STATMENT 'if' $at $as ( 'elif' $bt $bs)* ( 'else' $cs)? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(IF_STATMENT, "IF_STATMENT")
                , root_1);

                adaptor.addChild(root_1, 
                stream_99.nextNode()
                );

                adaptor.addChild(root_1, stream_at.nextTree());

                adaptor.addChild(root_1, stream_as.nextTree());

                // Python.g:259:33: ( 'elif' $bt $bs)*
                while ( stream_bs.hasNext()||stream_91.hasNext()||stream_bt.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_91.nextNode()
                    );

                    adaptor.addChild(root_1, stream_bt.nextTree());

                    adaptor.addChild(root_1, stream_bs.nextTree());

                }
                stream_bs.reset();
                stream_91.reset();
                stream_bt.reset();

                // Python.g:259:51: ( 'else' $cs)?
                if ( stream_cs.hasNext()||stream_92.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_92.nextNode()
                    );

                    adaptor.addChild(root_1, stream_cs.nextTree());

                }
                stream_cs.reset();
                stream_92.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "if_stmt"


    public static class while_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "while_stmt"
    // Python.g:262:1: while_stmt : 'while' test COLON suite ( 'else' COLON suite )? -> ^( WHILE_STATMENT 'while' test suite ( 'else' suite )? ) ;
    public final PythonParser.while_stmt_return while_stmt() throws RecognitionException {
        PythonParser.while_stmt_return retval = new PythonParser.while_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal134=null;
        Token COLON136=null;
        Token string_literal138=null;
        Token COLON139=null;
        PythonParser.test_return test135 =null;

        PythonParser.suite_return suite137 =null;

        PythonParser.suite_return suite140 =null;


        CommonTree string_literal134_tree=null;
        CommonTree COLON136_tree=null;
        CommonTree string_literal138_tree=null;
        CommonTree COLON139_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,"token 92");
        RewriteRuleTokenStream stream_111=new RewriteRuleTokenStream(adaptor,"token 111");
        RewriteRuleSubtreeStream stream_test=new RewriteRuleSubtreeStream(adaptor,"rule test");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        try {
            // Python.g:262:11: ( 'while' test COLON suite ( 'else' COLON suite )? -> ^( WHILE_STATMENT 'while' test suite ( 'else' suite )? ) )
            // Python.g:262:13: 'while' test COLON suite ( 'else' COLON suite )?
            {
            string_literal134=(Token)match(input,111,FOLLOW_111_in_while_stmt1387);  
            stream_111.add(string_literal134);


            pushFollow(FOLLOW_test_in_while_stmt1389);
            test135=test();

            state._fsp--;

            stream_test.add(test135.getTree());

            COLON136=(Token)match(input,COLON,FOLLOW_COLON_in_while_stmt1391);  
            stream_COLON.add(COLON136);


            pushFollow(FOLLOW_suite_in_while_stmt1393);
            suite137=suite();

            state._fsp--;

            stream_suite.add(suite137.getTree());

            // Python.g:262:38: ( 'else' COLON suite )?
            int alt42=2;
            int LA42_0 = input.LA(1);

            if ( (LA42_0==92) ) {
                alt42=1;
            }
            switch (alt42) {
                case 1 :
                    // Python.g:262:39: 'else' COLON suite
                    {
                    string_literal138=(Token)match(input,92,FOLLOW_92_in_while_stmt1396);  
                    stream_92.add(string_literal138);


                    COLON139=(Token)match(input,COLON,FOLLOW_COLON_in_while_stmt1398);  
                    stream_COLON.add(COLON139);


                    pushFollow(FOLLOW_suite_in_while_stmt1400);
                    suite140=suite();

                    state._fsp--;

                    stream_suite.add(suite140.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: 111, test, 92, suite, suite
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 263:3: -> ^( WHILE_STATMENT 'while' test suite ( 'else' suite )? )
            {
                // Python.g:263:6: ^( WHILE_STATMENT 'while' test suite ( 'else' suite )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(WHILE_STATMENT, "WHILE_STATMENT")
                , root_1);

                adaptor.addChild(root_1, 
                stream_111.nextNode()
                );

                adaptor.addChild(root_1, stream_test.nextTree());

                adaptor.addChild(root_1, stream_suite.nextTree());

                // Python.g:263:42: ( 'else' suite )?
                if ( stream_92.hasNext()||stream_suite.hasNext() ) {
                    adaptor.addChild(root_1, 
                    stream_92.nextNode()
                    );

                    adaptor.addChild(root_1, stream_suite.nextTree());

                }
                stream_92.reset();
                stream_suite.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "while_stmt"


    public static class for_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "for_stmt"
    // Python.g:266:1: for_stmt : 'for' exprlist 'in' testlist COLON suite ( 'else' COLON suite )? -> ^( FOR_STATMENT exprlist testlist suite ) ;
    public final PythonParser.for_stmt_return for_stmt() throws RecognitionException {
        PythonParser.for_stmt_return retval = new PythonParser.for_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal141=null;
        Token string_literal143=null;
        Token COLON145=null;
        Token string_literal147=null;
        Token COLON148=null;
        PythonParser.exprlist_return exprlist142 =null;

        PythonParser.testlist_return testlist144 =null;

        PythonParser.suite_return suite146 =null;

        PythonParser.suite_return suite149 =null;


        CommonTree string_literal141_tree=null;
        CommonTree string_literal143_tree=null;
        CommonTree COLON145_tree=null;
        CommonTree string_literal147_tree=null;
        CommonTree COLON148_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_96=new RewriteRuleTokenStream(adaptor,"token 96");
        RewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,"token 92");
        RewriteRuleTokenStream stream_101=new RewriteRuleTokenStream(adaptor,"token 101");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        RewriteRuleSubtreeStream stream_exprlist=new RewriteRuleSubtreeStream(adaptor,"rule exprlist");
        RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,"rule testlist");
        try {
            // Python.g:266:9: ( 'for' exprlist 'in' testlist COLON suite ( 'else' COLON suite )? -> ^( FOR_STATMENT exprlist testlist suite ) )
            // Python.g:266:11: 'for' exprlist 'in' testlist COLON suite ( 'else' COLON suite )?
            {
            string_literal141=(Token)match(input,96,FOLLOW_96_in_for_stmt1432);  
            stream_96.add(string_literal141);


            pushFollow(FOLLOW_exprlist_in_for_stmt1434);
            exprlist142=exprlist();

            state._fsp--;

            stream_exprlist.add(exprlist142.getTree());

            string_literal143=(Token)match(input,101,FOLLOW_101_in_for_stmt1436);  
            stream_101.add(string_literal143);


            pushFollow(FOLLOW_testlist_in_for_stmt1438);
            testlist144=testlist();

            state._fsp--;

            stream_testlist.add(testlist144.getTree());

            COLON145=(Token)match(input,COLON,FOLLOW_COLON_in_for_stmt1440);  
            stream_COLON.add(COLON145);


            pushFollow(FOLLOW_suite_in_for_stmt1442);
            suite146=suite();

            state._fsp--;

            stream_suite.add(suite146.getTree());

            // Python.g:266:52: ( 'else' COLON suite )?
            int alt43=2;
            int LA43_0 = input.LA(1);

            if ( (LA43_0==92) ) {
                alt43=1;
            }
            switch (alt43) {
                case 1 :
                    // Python.g:266:53: 'else' COLON suite
                    {
                    string_literal147=(Token)match(input,92,FOLLOW_92_in_for_stmt1445);  
                    stream_92.add(string_literal147);


                    COLON148=(Token)match(input,COLON,FOLLOW_COLON_in_for_stmt1447);  
                    stream_COLON.add(COLON148);


                    pushFollow(FOLLOW_suite_in_for_stmt1449);
                    suite149=suite();

                    state._fsp--;

                    stream_suite.add(suite149.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: exprlist, suite, testlist
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 267:3: -> ^( FOR_STATMENT exprlist testlist suite )
            {
                // Python.g:267:6: ^( FOR_STATMENT exprlist testlist suite )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(FOR_STATMENT, "FOR_STATMENT")
                , root_1);

                adaptor.addChild(root_1, stream_exprlist.nextTree());

                adaptor.addChild(root_1, stream_testlist.nextTree());

                adaptor.addChild(root_1, stream_suite.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "for_stmt"


    public static class try_stmt_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "try_stmt"
    // Python.g:270:1: try_stmt : 'try' COLON tryB= suite ( ( except_clause COLON exceB= suite )+ ( 'else' COLON suite )? | 'finally' COLON finalB= suite ) -> ^( TRY_STATMENT $tryB ( except_clause $exceB)+ ( ^( FINALLY_STATMENT $finalB) )? ) ;
    public final PythonParser.try_stmt_return try_stmt() throws RecognitionException {
        PythonParser.try_stmt_return retval = new PythonParser.try_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal150=null;
        Token COLON151=null;
        Token COLON153=null;
        Token string_literal154=null;
        Token COLON155=null;
        Token string_literal157=null;
        Token COLON158=null;
        PythonParser.suite_return tryB =null;

        PythonParser.suite_return exceB =null;

        PythonParser.suite_return finalB =null;

        PythonParser.except_clause_return except_clause152 =null;

        PythonParser.suite_return suite156 =null;


        CommonTree string_literal150_tree=null;
        CommonTree COLON151_tree=null;
        CommonTree COLON153_tree=null;
        CommonTree string_literal154_tree=null;
        CommonTree COLON155_tree=null;
        CommonTree string_literal157_tree=null;
        CommonTree COLON158_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_95=new RewriteRuleTokenStream(adaptor,"token 95");
        RewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,"token 92");
        RewriteRuleTokenStream stream_110=new RewriteRuleTokenStream(adaptor,"token 110");
        RewriteRuleSubtreeStream stream_except_clause=new RewriteRuleSubtreeStream(adaptor,"rule except_clause");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        try {
            // Python.g:271:5: ( 'try' COLON tryB= suite ( ( except_clause COLON exceB= suite )+ ( 'else' COLON suite )? | 'finally' COLON finalB= suite ) -> ^( TRY_STATMENT $tryB ( except_clause $exceB)+ ( ^( FINALLY_STATMENT $finalB) )? ) )
            // Python.g:271:9: 'try' COLON tryB= suite ( ( except_clause COLON exceB= suite )+ ( 'else' COLON suite )? | 'finally' COLON finalB= suite )
            {
            string_literal150=(Token)match(input,110,FOLLOW_110_in_try_stmt1481);  
            stream_110.add(string_literal150);


            COLON151=(Token)match(input,COLON,FOLLOW_COLON_in_try_stmt1483);  
            stream_COLON.add(COLON151);


            pushFollow(FOLLOW_suite_in_try_stmt1487);
            tryB=suite();

            state._fsp--;

            stream_suite.add(tryB.getTree());

            // Python.g:271:32: ( ( except_clause COLON exceB= suite )+ ( 'else' COLON suite )? | 'finally' COLON finalB= suite )
            int alt46=2;
            int LA46_0 = input.LA(1);

            if ( (LA46_0==93) ) {
                alt46=1;
            }
            else if ( (LA46_0==95) ) {
                alt46=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 46, 0, input);

                throw nvae;

            }
            switch (alt46) {
                case 1 :
                    // Python.g:271:36: ( except_clause COLON exceB= suite )+ ( 'else' COLON suite )?
                    {
                    // Python.g:271:36: ( except_clause COLON exceB= suite )+
                    int cnt44=0;
                    loop44:
                    do {
                        int alt44=2;
                        int LA44_0 = input.LA(1);

                        if ( (LA44_0==93) ) {
                            alt44=1;
                        }


                        switch (alt44) {
                    	case 1 :
                    	    // Python.g:271:37: except_clause COLON exceB= suite
                    	    {
                    	    pushFollow(FOLLOW_except_clause_in_try_stmt1494);
                    	    except_clause152=except_clause();

                    	    state._fsp--;

                    	    stream_except_clause.add(except_clause152.getTree());

                    	    COLON153=(Token)match(input,COLON,FOLLOW_COLON_in_try_stmt1496);  
                    	    stream_COLON.add(COLON153);


                    	    pushFollow(FOLLOW_suite_in_try_stmt1500);
                    	    exceB=suite();

                    	    state._fsp--;

                    	    stream_suite.add(exceB.getTree());

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt44 >= 1 ) break loop44;
                                EarlyExitException eee =
                                    new EarlyExitException(44, input);
                                throw eee;
                        }
                        cnt44++;
                    } while (true);


                    // Python.g:271:71: ( 'else' COLON suite )?
                    int alt45=2;
                    int LA45_0 = input.LA(1);

                    if ( (LA45_0==92) ) {
                        alt45=1;
                    }
                    switch (alt45) {
                        case 1 :
                            // Python.g:271:72: 'else' COLON suite
                            {
                            string_literal154=(Token)match(input,92,FOLLOW_92_in_try_stmt1505);  
                            stream_92.add(string_literal154);


                            COLON155=(Token)match(input,COLON,FOLLOW_COLON_in_try_stmt1507);  
                            stream_COLON.add(COLON155);


                            pushFollow(FOLLOW_suite_in_try_stmt1509);
                            suite156=suite();

                            state._fsp--;

                            stream_suite.add(suite156.getTree());

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // Python.g:271:98: 'finally' COLON finalB= suite
                    {
                    string_literal157=(Token)match(input,95,FOLLOW_95_in_try_stmt1518);  
                    stream_95.add(string_literal157);


                    COLON158=(Token)match(input,COLON,FOLLOW_COLON_in_try_stmt1520);  
                    stream_COLON.add(COLON158);


                    pushFollow(FOLLOW_suite_in_try_stmt1524);
                    finalB=suite();

                    state._fsp--;

                    stream_suite.add(finalB.getTree());

                    }
                    break;

            }


            // AST REWRITE
            // elements: finalB, exceB, except_clause, tryB
            // token labels: 
            // rule labels: retval, exceB, finalB, tryB
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_exceB=new RewriteRuleSubtreeStream(adaptor,"rule exceB",exceB!=null?exceB.tree:null);
            RewriteRuleSubtreeStream stream_finalB=new RewriteRuleSubtreeStream(adaptor,"rule finalB",finalB!=null?finalB.tree:null);
            RewriteRuleSubtreeStream stream_tryB=new RewriteRuleSubtreeStream(adaptor,"rule tryB",tryB!=null?tryB.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 272:6: -> ^( TRY_STATMENT $tryB ( except_clause $exceB)+ ( ^( FINALLY_STATMENT $finalB) )? )
            {
                // Python.g:272:9: ^( TRY_STATMENT $tryB ( except_clause $exceB)+ ( ^( FINALLY_STATMENT $finalB) )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(TRY_STATMENT, "TRY_STATMENT")
                , root_1);

                adaptor.addChild(root_1, stream_tryB.nextTree());

                if ( !(stream_exceB.hasNext()||stream_except_clause.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_exceB.hasNext()||stream_except_clause.hasNext() ) {
                    adaptor.addChild(root_1, stream_except_clause.nextTree());

                    adaptor.addChild(root_1, stream_exceB.nextTree());

                }
                stream_exceB.reset();
                stream_except_clause.reset();

                // Python.g:272:55: ( ^( FINALLY_STATMENT $finalB) )?
                if ( stream_finalB.hasNext() ) {
                    // Python.g:272:55: ^( FINALLY_STATMENT $finalB)
                    {
                    CommonTree root_2 = (CommonTree)adaptor.nil();
                    root_2 = (CommonTree)adaptor.becomeRoot(
                    (CommonTree)adaptor.create(FINALLY_STATMENT, "FINALLY_STATMENT")
                    , root_2);

                    adaptor.addChild(root_2, stream_finalB.nextTree());

                    adaptor.addChild(root_1, root_2);
                    }

                }
                stream_finalB.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "try_stmt"


    public static class except_clause_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "except_clause"
    // Python.g:275:1: except_clause : 'except' (a= test ( COMMA b= test )? )? -> ^( EXCEPT_STATMENT ( $a ( COMMA $b)? )? ) ;
    public final PythonParser.except_clause_return except_clause() throws RecognitionException {
        PythonParser.except_clause_return retval = new PythonParser.except_clause_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal159=null;
        Token COMMA160=null;
        PythonParser.test_return a =null;

        PythonParser.test_return b =null;


        CommonTree string_literal159_tree=null;
        CommonTree COMMA160_tree=null;
        RewriteRuleTokenStream stream_93=new RewriteRuleTokenStream(adaptor,"token 93");
        RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_test=new RewriteRuleSubtreeStream(adaptor,"rule test");
        try {
            // Python.g:275:14: ( 'except' (a= test ( COMMA b= test )? )? -> ^( EXCEPT_STATMENT ( $a ( COMMA $b)? )? ) )
            // Python.g:275:16: 'except' (a= test ( COMMA b= test )? )?
            {
            string_literal159=(Token)match(input,93,FOLLOW_93_in_except_clause1569);  
            stream_93.add(string_literal159);


            // Python.g:275:25: (a= test ( COMMA b= test )? )?
            int alt48=2;
            int LA48_0 = input.LA(1);

            if ( (LA48_0==BACKQUOTE||LA48_0==COMPLEX||LA48_0==FLOAT||(LA48_0 >= INT && LA48_0 <= LCURLY)||(LA48_0 >= LONGINT && LA48_0 <= MINUS)||LA48_0==NAME||LA48_0==PLUS||LA48_0==STRING||LA48_0==TILDE||(LA48_0 >= 103 && LA48_0 <= 104)) ) {
                alt48=1;
            }
            switch (alt48) {
                case 1 :
                    // Python.g:275:26: a= test ( COMMA b= test )?
                    {
                    pushFollow(FOLLOW_test_in_except_clause1574);
                    a=test();

                    state._fsp--;

                    stream_test.add(a.getTree());

                    // Python.g:275:33: ( COMMA b= test )?
                    int alt47=2;
                    int LA47_0 = input.LA(1);

                    if ( (LA47_0==COMMA) ) {
                        alt47=1;
                    }
                    switch (alt47) {
                        case 1 :
                            // Python.g:275:34: COMMA b= test
                            {
                            COMMA160=(Token)match(input,COMMA,FOLLOW_COMMA_in_except_clause1577);  
                            stream_COMMA.add(COMMA160);


                            pushFollow(FOLLOW_test_in_except_clause1581);
                            b=test();

                            state._fsp--;

                            stream_test.add(b.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }


            // AST REWRITE
            // elements: b, COMMA, a
            // token labels: 
            // rule labels: retval, b, a
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.tree:null);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"rule a",a!=null?a.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 275:51: -> ^( EXCEPT_STATMENT ( $a ( COMMA $b)? )? )
            {
                // Python.g:275:54: ^( EXCEPT_STATMENT ( $a ( COMMA $b)? )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(EXCEPT_STATMENT, "EXCEPT_STATMENT")
                , root_1);

                // Python.g:275:72: ( $a ( COMMA $b)? )?
                if ( stream_b.hasNext()||stream_COMMA.hasNext()||stream_a.hasNext() ) {
                    adaptor.addChild(root_1, stream_a.nextTree());

                    // Python.g:275:76: ( COMMA $b)?
                    if ( stream_b.hasNext()||stream_COMMA.hasNext() ) {
                        adaptor.addChild(root_1, 
                        stream_COMMA.nextNode()
                        );

                        adaptor.addChild(root_1, stream_b.nextTree());

                    }
                    stream_b.reset();
                    stream_COMMA.reset();

                }
                stream_b.reset();
                stream_COMMA.reset();
                stream_a.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "except_clause"


    public static class suite_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "suite"
    // Python.g:278:1: suite : ( simple_stmt | NEWLINE INDENT ( stmt )+ DEDENT -> ^( BLOCK ( stmt )+ ) );
    public final PythonParser.suite_return suite() throws RecognitionException {
        PythonParser.suite_return retval = new PythonParser.suite_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token NEWLINE162=null;
        Token INDENT163=null;
        Token DEDENT165=null;
        PythonParser.simple_stmt_return simple_stmt161 =null;

        PythonParser.stmt_return stmt164 =null;


        CommonTree NEWLINE162_tree=null;
        CommonTree INDENT163_tree=null;
        CommonTree DEDENT165_tree=null;
        RewriteRuleTokenStream stream_DEDENT=new RewriteRuleTokenStream(adaptor,"token DEDENT");
        RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
        RewriteRuleTokenStream stream_INDENT=new RewriteRuleTokenStream(adaptor,"token INDENT");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        try {
            // Python.g:278:6: ( simple_stmt | NEWLINE INDENT ( stmt )+ DEDENT -> ^( BLOCK ( stmt )+ ) )
            int alt50=2;
            int LA50_0 = input.LA(1);

            if ( (LA50_0==BACKQUOTE||LA50_0==COMPLEX||LA50_0==FLOAT||(LA50_0 >= INT && LA50_0 <= LCURLY)||(LA50_0 >= LONGINT && LA50_0 <= MINUS)||LA50_0==NAME||LA50_0==PLUS||LA50_0==STRING||LA50_0==TILDE||(LA50_0 >= 85 && LA50_0 <= 86)||LA50_0==88||LA50_0==90||LA50_0==94||(LA50_0 >= 97 && LA50_0 <= 98)||LA50_0==100||(LA50_0 >= 103 && LA50_0 <= 104)||(LA50_0 >= 106 && LA50_0 <= 109)||LA50_0==112) ) {
                alt50=1;
            }
            else if ( (LA50_0==NEWLINE) ) {
                alt50=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 50, 0, input);

                throw nvae;

            }
            switch (alt50) {
                case 1 :
                    // Python.g:278:8: simple_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_simple_stmt_in_suite1614);
                    simple_stmt161=simple_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, simple_stmt161.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:279:4: NEWLINE INDENT ( stmt )+ DEDENT
                    {
                    NEWLINE162=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_suite1619);  
                    stream_NEWLINE.add(NEWLINE162);


                    INDENT163=(Token)match(input,INDENT,FOLLOW_INDENT_in_suite1621);  
                    stream_INDENT.add(INDENT163);


                    // Python.g:279:19: ( stmt )+
                    int cnt49=0;
                    loop49:
                    do {
                        int alt49=2;
                        int LA49_0 = input.LA(1);

                        if ( (LA49_0==BACKQUOTE||LA49_0==COMPLEX||LA49_0==FLOAT||(LA49_0 >= INT && LA49_0 <= LCURLY)||(LA49_0 >= LONGINT && LA49_0 <= MINUS)||LA49_0==NAME||LA49_0==PLUS||LA49_0==STRING||LA49_0==TILDE||(LA49_0 >= 85 && LA49_0 <= 90)||LA49_0==94||(LA49_0 >= 96 && LA49_0 <= 100)||(LA49_0 >= 103 && LA49_0 <= 104)||(LA49_0 >= 106 && LA49_0 <= 112)) ) {
                            alt49=1;
                        }


                        switch (alt49) {
                    	case 1 :
                    	    // Python.g:279:20: stmt
                    	    {
                    	    pushFollow(FOLLOW_stmt_in_suite1624);
                    	    stmt164=stmt();

                    	    state._fsp--;

                    	    stream_stmt.add(stmt164.getTree());

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt49 >= 1 ) break loop49;
                                EarlyExitException eee =
                                    new EarlyExitException(49, input);
                                throw eee;
                        }
                        cnt49++;
                    } while (true);


                    DEDENT165=(Token)match(input,DEDENT,FOLLOW_DEDENT_in_suite1628);  
                    stream_DEDENT.add(DEDENT165);


                    // AST REWRITE
                    // elements: stmt
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 279:34: -> ^( BLOCK ( stmt )+ )
                    {
                        // Python.g:279:37: ^( BLOCK ( stmt )+ )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        (CommonTree)adaptor.create(BLOCK, "BLOCK")
                        , root_1);

                        if ( !(stream_stmt.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_stmt.hasNext() ) {
                            adaptor.addChild(root_1, stream_stmt.nextTree());

                        }
                        stream_stmt.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "suite"


    public static class test_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "test"
    // Python.g:283:1: test : ( and_test ( 'or' and_test )* | lambdef );
    public final PythonParser.test_return test() throws RecognitionException {
        PythonParser.test_return retval = new PythonParser.test_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal167=null;
        PythonParser.and_test_return and_test166 =null;

        PythonParser.and_test_return and_test168 =null;

        PythonParser.lambdef_return lambdef169 =null;


        CommonTree string_literal167_tree=null;

        try {
            // Python.g:283:5: ( and_test ( 'or' and_test )* | lambdef )
            int alt52=2;
            int LA52_0 = input.LA(1);

            if ( (LA52_0==BACKQUOTE||LA52_0==COMPLEX||LA52_0==FLOAT||(LA52_0 >= INT && LA52_0 <= LCURLY)||(LA52_0 >= LONGINT && LA52_0 <= MINUS)||LA52_0==NAME||LA52_0==PLUS||LA52_0==STRING||LA52_0==TILDE||LA52_0==104) ) {
                alt52=1;
            }
            else if ( (LA52_0==103) ) {
                alt52=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 52, 0, input);

                throw nvae;

            }
            switch (alt52) {
                case 1 :
                    // Python.g:283:7: and_test ( 'or' and_test )*
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_and_test_in_test1647);
                    and_test166=and_test();

                    state._fsp--;

                    adaptor.addChild(root_0, and_test166.getTree());

                    // Python.g:283:16: ( 'or' and_test )*
                    loop51:
                    do {
                        int alt51=2;
                        int LA51_0 = input.LA(1);

                        if ( (LA51_0==105) ) {
                            alt51=1;
                        }


                        switch (alt51) {
                    	case 1 :
                    	    // Python.g:283:17: 'or' and_test
                    	    {
                    	    string_literal167=(Token)match(input,105,FOLLOW_105_in_test1650); 
                    	    string_literal167_tree = 
                    	    (CommonTree)adaptor.create(string_literal167)
                    	    ;
                    	    adaptor.addChild(root_0, string_literal167_tree);


                    	    pushFollow(FOLLOW_and_test_in_test1652);
                    	    and_test168=and_test();

                    	    state._fsp--;

                    	    adaptor.addChild(root_0, and_test168.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop51;
                        }
                    } while (true);


                    }
                    break;
                case 2 :
                    // Python.g:284:4: lambdef
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_lambdef_in_test1659);
                    lambdef169=lambdef();

                    state._fsp--;

                    adaptor.addChild(root_0, lambdef169.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "test"


    public static class and_test_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "and_test"
    // Python.g:287:1: and_test : not_test ( 'and' not_test )* ;
    public final PythonParser.and_test_return and_test() throws RecognitionException {
        PythonParser.and_test_return retval = new PythonParser.and_test_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal171=null;
        PythonParser.not_test_return not_test170 =null;

        PythonParser.not_test_return not_test172 =null;


        CommonTree string_literal171_tree=null;

        try {
            // Python.g:288:2: ( not_test ( 'and' not_test )* )
            // Python.g:288:4: not_test ( 'and' not_test )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_not_test_in_and_test1670);
            not_test170=not_test();

            state._fsp--;

            adaptor.addChild(root_0, not_test170.getTree());

            // Python.g:288:13: ( 'and' not_test )*
            loop53:
            do {
                int alt53=2;
                int LA53_0 = input.LA(1);

                if ( (LA53_0==84) ) {
                    alt53=1;
                }


                switch (alt53) {
            	case 1 :
            	    // Python.g:288:14: 'and' not_test
            	    {
            	    string_literal171=(Token)match(input,84,FOLLOW_84_in_and_test1673); 
            	    string_literal171_tree = 
            	    (CommonTree)adaptor.create(string_literal171)
            	    ;
            	    adaptor.addChild(root_0, string_literal171_tree);


            	    pushFollow(FOLLOW_not_test_in_and_test1675);
            	    not_test172=not_test();

            	    state._fsp--;

            	    adaptor.addChild(root_0, not_test172.getTree());

            	    }
            	    break;

            	default :
            	    break loop53;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "and_test"


    public static class not_test_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "not_test"
    // Python.g:291:1: not_test : ( 'not' not_test | comparison );
    public final PythonParser.not_test_return not_test() throws RecognitionException {
        PythonParser.not_test_return retval = new PythonParser.not_test_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal173=null;
        PythonParser.not_test_return not_test174 =null;

        PythonParser.comparison_return comparison175 =null;


        CommonTree string_literal173_tree=null;

        try {
            // Python.g:292:2: ( 'not' not_test | comparison )
            int alt54=2;
            int LA54_0 = input.LA(1);

            if ( (LA54_0==104) ) {
                alt54=1;
            }
            else if ( (LA54_0==BACKQUOTE||LA54_0==COMPLEX||LA54_0==FLOAT||(LA54_0 >= INT && LA54_0 <= LCURLY)||(LA54_0 >= LONGINT && LA54_0 <= MINUS)||LA54_0==NAME||LA54_0==PLUS||LA54_0==STRING||LA54_0==TILDE) ) {
                alt54=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 54, 0, input);

                throw nvae;

            }
            switch (alt54) {
                case 1 :
                    // Python.g:292:4: 'not' not_test
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal173=(Token)match(input,104,FOLLOW_104_in_not_test1688); 
                    string_literal173_tree = 
                    (CommonTree)adaptor.create(string_literal173)
                    ;
                    adaptor.addChild(root_0, string_literal173_tree);


                    pushFollow(FOLLOW_not_test_in_not_test1690);
                    not_test174=not_test();

                    state._fsp--;

                    adaptor.addChild(root_0, not_test174.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:293:4: comparison
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_comparison_in_not_test1695);
                    comparison175=comparison();

                    state._fsp--;

                    adaptor.addChild(root_0, comparison175.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "not_test"


    public static class comparison_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "comparison"
    // Python.g:296:1: comparison : expr ( comp_op expr )* ;
    public final PythonParser.comparison_return comparison() throws RecognitionException {
        PythonParser.comparison_return retval = new PythonParser.comparison_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.expr_return expr176 =null;

        PythonParser.comp_op_return comp_op177 =null;

        PythonParser.expr_return expr178 =null;



        try {
            // Python.g:296:11: ( expr ( comp_op expr )* )
            // Python.g:296:13: expr ( comp_op expr )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_expr_in_comparison1704);
            expr176=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr176.getTree());

            // Python.g:296:18: ( comp_op expr )*
            loop55:
            do {
                int alt55=2;
                int LA55_0 = input.LA(1);

                if ( (LA55_0==ALT_NOTEQUAL||LA55_0==EQUAL||(LA55_0 >= GREATER && LA55_0 <= GREATEREQUAL)||(LA55_0 >= LESS && LA55_0 <= LESSEQUAL)||LA55_0==NOTEQUAL||(LA55_0 >= 101 && LA55_0 <= 102)||LA55_0==104) ) {
                    alt55=1;
                }


                switch (alt55) {
            	case 1 :
            	    // Python.g:296:19: comp_op expr
            	    {
            	    pushFollow(FOLLOW_comp_op_in_comparison1707);
            	    comp_op177=comp_op();

            	    state._fsp--;

            	    adaptor.addChild(root_0, comp_op177.getTree());

            	    pushFollow(FOLLOW_expr_in_comparison1709);
            	    expr178=expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, expr178.getTree());

            	    }
            	    break;

            	default :
            	    break loop55;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "comparison"


    public static class comp_op_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "comp_op"
    // Python.g:299:1: comp_op : ( LESS | GREATER | EQUAL | GREATEREQUAL | LESSEQUAL | ALT_NOTEQUAL | NOTEQUAL | 'in' | 'not' 'in' | 'is' | 'is' 'not' );
    public final PythonParser.comp_op_return comp_op() throws RecognitionException {
        PythonParser.comp_op_return retval = new PythonParser.comp_op_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LESS179=null;
        Token GREATER180=null;
        Token EQUAL181=null;
        Token GREATEREQUAL182=null;
        Token LESSEQUAL183=null;
        Token ALT_NOTEQUAL184=null;
        Token NOTEQUAL185=null;
        Token string_literal186=null;
        Token string_literal187=null;
        Token string_literal188=null;
        Token string_literal189=null;
        Token string_literal190=null;
        Token string_literal191=null;

        CommonTree LESS179_tree=null;
        CommonTree GREATER180_tree=null;
        CommonTree EQUAL181_tree=null;
        CommonTree GREATEREQUAL182_tree=null;
        CommonTree LESSEQUAL183_tree=null;
        CommonTree ALT_NOTEQUAL184_tree=null;
        CommonTree NOTEQUAL185_tree=null;
        CommonTree string_literal186_tree=null;
        CommonTree string_literal187_tree=null;
        CommonTree string_literal188_tree=null;
        CommonTree string_literal189_tree=null;
        CommonTree string_literal190_tree=null;
        CommonTree string_literal191_tree=null;

        try {
            // Python.g:299:8: ( LESS | GREATER | EQUAL | GREATEREQUAL | LESSEQUAL | ALT_NOTEQUAL | NOTEQUAL | 'in' | 'not' 'in' | 'is' | 'is' 'not' )
            int alt56=11;
            switch ( input.LA(1) ) {
            case LESS:
                {
                alt56=1;
                }
                break;
            case GREATER:
                {
                alt56=2;
                }
                break;
            case EQUAL:
                {
                alt56=3;
                }
                break;
            case GREATEREQUAL:
                {
                alt56=4;
                }
                break;
            case LESSEQUAL:
                {
                alt56=5;
                }
                break;
            case ALT_NOTEQUAL:
                {
                alt56=6;
                }
                break;
            case NOTEQUAL:
                {
                alt56=7;
                }
                break;
            case 101:
                {
                alt56=8;
                }
                break;
            case 104:
                {
                alt56=9;
                }
                break;
            case 102:
                {
                int LA56_10 = input.LA(2);

                if ( (LA56_10==104) ) {
                    alt56=11;
                }
                else if ( (LA56_10==BACKQUOTE||LA56_10==COMPLEX||LA56_10==FLOAT||(LA56_10 >= INT && LA56_10 <= LCURLY)||(LA56_10 >= LONGINT && LA56_10 <= MINUS)||LA56_10==NAME||LA56_10==PLUS||LA56_10==STRING||LA56_10==TILDE) ) {
                    alt56=10;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 56, 10, input);

                    throw nvae;

                }
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 56, 0, input);

                throw nvae;

            }

            switch (alt56) {
                case 1 :
                    // Python.g:299:10: LESS
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LESS179=(Token)match(input,LESS,FOLLOW_LESS_in_comp_op1720); 
                    LESS179_tree = 
                    (CommonTree)adaptor.create(LESS179)
                    ;
                    adaptor.addChild(root_0, LESS179_tree);


                    }
                    break;
                case 2 :
                    // Python.g:300:3: GREATER
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    GREATER180=(Token)match(input,GREATER,FOLLOW_GREATER_in_comp_op1724); 
                    GREATER180_tree = 
                    (CommonTree)adaptor.create(GREATER180)
                    ;
                    adaptor.addChild(root_0, GREATER180_tree);


                    }
                    break;
                case 3 :
                    // Python.g:301:3: EQUAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    EQUAL181=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_comp_op1728); 
                    EQUAL181_tree = 
                    (CommonTree)adaptor.create(EQUAL181)
                    ;
                    adaptor.addChild(root_0, EQUAL181_tree);


                    }
                    break;
                case 4 :
                    // Python.g:302:3: GREATEREQUAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    GREATEREQUAL182=(Token)match(input,GREATEREQUAL,FOLLOW_GREATEREQUAL_in_comp_op1732); 
                    GREATEREQUAL182_tree = 
                    (CommonTree)adaptor.create(GREATEREQUAL182)
                    ;
                    adaptor.addChild(root_0, GREATEREQUAL182_tree);


                    }
                    break;
                case 5 :
                    // Python.g:303:3: LESSEQUAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LESSEQUAL183=(Token)match(input,LESSEQUAL,FOLLOW_LESSEQUAL_in_comp_op1736); 
                    LESSEQUAL183_tree = 
                    (CommonTree)adaptor.create(LESSEQUAL183)
                    ;
                    adaptor.addChild(root_0, LESSEQUAL183_tree);


                    }
                    break;
                case 6 :
                    // Python.g:304:3: ALT_NOTEQUAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    ALT_NOTEQUAL184=(Token)match(input,ALT_NOTEQUAL,FOLLOW_ALT_NOTEQUAL_in_comp_op1740); 
                    ALT_NOTEQUAL184_tree = 
                    (CommonTree)adaptor.create(ALT_NOTEQUAL184)
                    ;
                    adaptor.addChild(root_0, ALT_NOTEQUAL184_tree);


                    }
                    break;
                case 7 :
                    // Python.g:305:3: NOTEQUAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    NOTEQUAL185=(Token)match(input,NOTEQUAL,FOLLOW_NOTEQUAL_in_comp_op1744); 
                    NOTEQUAL185_tree = 
                    (CommonTree)adaptor.create(NOTEQUAL185)
                    ;
                    adaptor.addChild(root_0, NOTEQUAL185_tree);


                    }
                    break;
                case 8 :
                    // Python.g:306:3: 'in'
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal186=(Token)match(input,101,FOLLOW_101_in_comp_op1748); 
                    string_literal186_tree = 
                    (CommonTree)adaptor.create(string_literal186)
                    ;
                    adaptor.addChild(root_0, string_literal186_tree);


                    }
                    break;
                case 9 :
                    // Python.g:307:3: 'not' 'in'
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal187=(Token)match(input,104,FOLLOW_104_in_comp_op1752); 
                    string_literal187_tree = 
                    (CommonTree)adaptor.create(string_literal187)
                    ;
                    adaptor.addChild(root_0, string_literal187_tree);


                    string_literal188=(Token)match(input,101,FOLLOW_101_in_comp_op1754); 
                    string_literal188_tree = 
                    (CommonTree)adaptor.create(string_literal188)
                    ;
                    adaptor.addChild(root_0, string_literal188_tree);


                    }
                    break;
                case 10 :
                    // Python.g:308:3: 'is'
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal189=(Token)match(input,102,FOLLOW_102_in_comp_op1758); 
                    string_literal189_tree = 
                    (CommonTree)adaptor.create(string_literal189)
                    ;
                    adaptor.addChild(root_0, string_literal189_tree);


                    }
                    break;
                case 11 :
                    // Python.g:309:3: 'is' 'not'
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal190=(Token)match(input,102,FOLLOW_102_in_comp_op1762); 
                    string_literal190_tree = 
                    (CommonTree)adaptor.create(string_literal190)
                    ;
                    adaptor.addChild(root_0, string_literal190_tree);


                    string_literal191=(Token)match(input,104,FOLLOW_104_in_comp_op1764); 
                    string_literal191_tree = 
                    (CommonTree)adaptor.create(string_literal191)
                    ;
                    adaptor.addChild(root_0, string_literal191_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "comp_op"


    public static class expr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "expr"
    // Python.g:312:1: expr : xor_expr ( VBAR xor_expr )* ;
    public final PythonParser.expr_return expr() throws RecognitionException {
        PythonParser.expr_return retval = new PythonParser.expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token VBAR193=null;
        PythonParser.xor_expr_return xor_expr192 =null;

        PythonParser.xor_expr_return xor_expr194 =null;


        CommonTree VBAR193_tree=null;

        try {
            // Python.g:312:5: ( xor_expr ( VBAR xor_expr )* )
            // Python.g:312:7: xor_expr ( VBAR xor_expr )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_xor_expr_in_expr1773);
            xor_expr192=xor_expr();

            state._fsp--;

            adaptor.addChild(root_0, xor_expr192.getTree());

            // Python.g:312:16: ( VBAR xor_expr )*
            loop57:
            do {
                int alt57=2;
                int LA57_0 = input.LA(1);

                if ( (LA57_0==VBAR) ) {
                    alt57=1;
                }


                switch (alt57) {
            	case 1 :
            	    // Python.g:312:17: VBAR xor_expr
            	    {
            	    VBAR193=(Token)match(input,VBAR,FOLLOW_VBAR_in_expr1776); 
            	    VBAR193_tree = 
            	    (CommonTree)adaptor.create(VBAR193)
            	    ;
            	    adaptor.addChild(root_0, VBAR193_tree);


            	    pushFollow(FOLLOW_xor_expr_in_expr1778);
            	    xor_expr194=xor_expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, xor_expr194.getTree());

            	    }
            	    break;

            	default :
            	    break loop57;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "expr"


    public static class xor_expr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "xor_expr"
    // Python.g:315:1: xor_expr : and_expr ( CIRCUMFLEX and_expr )* ;
    public final PythonParser.xor_expr_return xor_expr() throws RecognitionException {
        PythonParser.xor_expr_return retval = new PythonParser.xor_expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token CIRCUMFLEX196=null;
        PythonParser.and_expr_return and_expr195 =null;

        PythonParser.and_expr_return and_expr197 =null;


        CommonTree CIRCUMFLEX196_tree=null;

        try {
            // Python.g:315:9: ( and_expr ( CIRCUMFLEX and_expr )* )
            // Python.g:315:11: and_expr ( CIRCUMFLEX and_expr )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_and_expr_in_xor_expr1789);
            and_expr195=and_expr();

            state._fsp--;

            adaptor.addChild(root_0, and_expr195.getTree());

            // Python.g:315:20: ( CIRCUMFLEX and_expr )*
            loop58:
            do {
                int alt58=2;
                int LA58_0 = input.LA(1);

                if ( (LA58_0==CIRCUMFLEX) ) {
                    alt58=1;
                }


                switch (alt58) {
            	case 1 :
            	    // Python.g:315:21: CIRCUMFLEX and_expr
            	    {
            	    CIRCUMFLEX196=(Token)match(input,CIRCUMFLEX,FOLLOW_CIRCUMFLEX_in_xor_expr1792); 
            	    CIRCUMFLEX196_tree = 
            	    (CommonTree)adaptor.create(CIRCUMFLEX196)
            	    ;
            	    adaptor.addChild(root_0, CIRCUMFLEX196_tree);


            	    pushFollow(FOLLOW_and_expr_in_xor_expr1794);
            	    and_expr197=and_expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, and_expr197.getTree());

            	    }
            	    break;

            	default :
            	    break loop58;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "xor_expr"


    public static class and_expr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "and_expr"
    // Python.g:318:1: and_expr : shift_expr ( AMPER shift_expr )* ;
    public final PythonParser.and_expr_return and_expr() throws RecognitionException {
        PythonParser.and_expr_return retval = new PythonParser.and_expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token AMPER199=null;
        PythonParser.shift_expr_return shift_expr198 =null;

        PythonParser.shift_expr_return shift_expr200 =null;


        CommonTree AMPER199_tree=null;

        try {
            // Python.g:318:9: ( shift_expr ( AMPER shift_expr )* )
            // Python.g:318:11: shift_expr ( AMPER shift_expr )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_shift_expr_in_and_expr1805);
            shift_expr198=shift_expr();

            state._fsp--;

            adaptor.addChild(root_0, shift_expr198.getTree());

            // Python.g:318:22: ( AMPER shift_expr )*
            loop59:
            do {
                int alt59=2;
                int LA59_0 = input.LA(1);

                if ( (LA59_0==AMPER) ) {
                    alt59=1;
                }


                switch (alt59) {
            	case 1 :
            	    // Python.g:318:23: AMPER shift_expr
            	    {
            	    AMPER199=(Token)match(input,AMPER,FOLLOW_AMPER_in_and_expr1808); 
            	    AMPER199_tree = 
            	    (CommonTree)adaptor.create(AMPER199)
            	    ;
            	    adaptor.addChild(root_0, AMPER199_tree);


            	    pushFollow(FOLLOW_shift_expr_in_and_expr1810);
            	    shift_expr200=shift_expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, shift_expr200.getTree());

            	    }
            	    break;

            	default :
            	    break loop59;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "and_expr"


    public static class shift_expr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "shift_expr"
    // Python.g:321:1: shift_expr : arith_expr ( ( LEFTSHIFT | RIGHTSHIFT ) arith_expr )* ;
    public final PythonParser.shift_expr_return shift_expr() throws RecognitionException {
        PythonParser.shift_expr_return retval = new PythonParser.shift_expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token set202=null;
        PythonParser.arith_expr_return arith_expr201 =null;

        PythonParser.arith_expr_return arith_expr203 =null;


        CommonTree set202_tree=null;

        try {
            // Python.g:321:11: ( arith_expr ( ( LEFTSHIFT | RIGHTSHIFT ) arith_expr )* )
            // Python.g:321:13: arith_expr ( ( LEFTSHIFT | RIGHTSHIFT ) arith_expr )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_arith_expr_in_shift_expr1821);
            arith_expr201=arith_expr();

            state._fsp--;

            adaptor.addChild(root_0, arith_expr201.getTree());

            // Python.g:321:24: ( ( LEFTSHIFT | RIGHTSHIFT ) arith_expr )*
            loop60:
            do {
                int alt60=2;
                int LA60_0 = input.LA(1);

                if ( (LA60_0==LEFTSHIFT||LA60_0==RIGHTSHIFT) ) {
                    alt60=1;
                }


                switch (alt60) {
            	case 1 :
            	    // Python.g:321:25: ( LEFTSHIFT | RIGHTSHIFT ) arith_expr
            	    {
            	    set202=(Token)input.LT(1);

            	    if ( input.LA(1)==LEFTSHIFT||input.LA(1)==RIGHTSHIFT ) {
            	        input.consume();
            	        adaptor.addChild(root_0, 
            	        (CommonTree)adaptor.create(set202)
            	        );
            	        state.errorRecovery=false;
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        throw mse;
            	    }


            	    pushFollow(FOLLOW_arith_expr_in_shift_expr1830);
            	    arith_expr203=arith_expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, arith_expr203.getTree());

            	    }
            	    break;

            	default :
            	    break loop60;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "shift_expr"


    public static class arith_expr_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "arith_expr"
    // Python.g:324:1: arith_expr : term ( ( PLUS | MINUS ) term )* ;
    public final PythonParser.arith_expr_return arith_expr() throws RecognitionException {
        PythonParser.arith_expr_return retval = new PythonParser.arith_expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token set205=null;
        PythonParser.term_return term204 =null;

        PythonParser.term_return term206 =null;


        CommonTree set205_tree=null;

        try {
            // Python.g:324:11: ( term ( ( PLUS | MINUS ) term )* )
            // Python.g:324:13: term ( ( PLUS | MINUS ) term )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_term_in_arith_expr1841);
            term204=term();

            state._fsp--;

            adaptor.addChild(root_0, term204.getTree());

            // Python.g:324:18: ( ( PLUS | MINUS ) term )*
            loop61:
            do {
                int alt61=2;
                int LA61_0 = input.LA(1);

                if ( (LA61_0==MINUS||LA61_0==PLUS) ) {
                    alt61=1;
                }


                switch (alt61) {
            	case 1 :
            	    // Python.g:324:19: ( PLUS | MINUS ) term
            	    {
            	    set205=(Token)input.LT(1);

            	    if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {
            	        input.consume();
            	        adaptor.addChild(root_0, 
            	        (CommonTree)adaptor.create(set205)
            	        );
            	        state.errorRecovery=false;
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        throw mse;
            	    }


            	    pushFollow(FOLLOW_term_in_arith_expr1850);
            	    term206=term();

            	    state._fsp--;

            	    adaptor.addChild(root_0, term206.getTree());

            	    }
            	    break;

            	default :
            	    break loop61;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "arith_expr"


    public static class term_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "term"
    // Python.g:327:1: term : factor ( ( STAR | SLASH | PERCENT | DOUBLESLASH ) factor )* ;
    public final PythonParser.term_return term() throws RecognitionException {
        PythonParser.term_return retval = new PythonParser.term_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token set208=null;
        PythonParser.factor_return factor207 =null;

        PythonParser.factor_return factor209 =null;


        CommonTree set208_tree=null;

        try {
            // Python.g:327:5: ( factor ( ( STAR | SLASH | PERCENT | DOUBLESLASH ) factor )* )
            // Python.g:327:7: factor ( ( STAR | SLASH | PERCENT | DOUBLESLASH ) factor )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_factor_in_term1861);
            factor207=factor();

            state._fsp--;

            adaptor.addChild(root_0, factor207.getTree());

            // Python.g:327:14: ( ( STAR | SLASH | PERCENT | DOUBLESLASH ) factor )*
            loop62:
            do {
                int alt62=2;
                int LA62_0 = input.LA(1);

                if ( (LA62_0==DOUBLESLASH||LA62_0==PERCENT||LA62_0==SLASH||LA62_0==STAR) ) {
                    alt62=1;
                }


                switch (alt62) {
            	case 1 :
            	    // Python.g:327:15: ( STAR | SLASH | PERCENT | DOUBLESLASH ) factor
            	    {
            	    set208=(Token)input.LT(1);

            	    if ( input.LA(1)==DOUBLESLASH||input.LA(1)==PERCENT||input.LA(1)==SLASH||input.LA(1)==STAR ) {
            	        input.consume();
            	        adaptor.addChild(root_0, 
            	        (CommonTree)adaptor.create(set208)
            	        );
            	        state.errorRecovery=false;
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        throw mse;
            	    }


            	    pushFollow(FOLLOW_factor_in_term1881);
            	    factor209=factor();

            	    state._fsp--;

            	    adaptor.addChild(root_0, factor209.getTree());

            	    }
            	    break;

            	default :
            	    break loop62;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "term"


    public static class factor_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "factor"
    // Python.g:330:1: factor : ( ( PLUS | MINUS | TILDE ) factor | power );
    public final PythonParser.factor_return factor() throws RecognitionException {
        PythonParser.factor_return retval = new PythonParser.factor_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token set210=null;
        PythonParser.factor_return factor211 =null;

        PythonParser.power_return power212 =null;


        CommonTree set210_tree=null;

        try {
            // Python.g:331:2: ( ( PLUS | MINUS | TILDE ) factor | power )
            int alt63=2;
            int LA63_0 = input.LA(1);

            if ( (LA63_0==MINUS||LA63_0==PLUS||LA63_0==TILDE) ) {
                alt63=1;
            }
            else if ( (LA63_0==BACKQUOTE||LA63_0==COMPLEX||LA63_0==FLOAT||(LA63_0 >= INT && LA63_0 <= LCURLY)||(LA63_0 >= LONGINT && LA63_0 <= LPAREN)||LA63_0==NAME||LA63_0==STRING) ) {
                alt63=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 63, 0, input);

                throw nvae;

            }
            switch (alt63) {
                case 1 :
                    // Python.g:331:4: ( PLUS | MINUS | TILDE ) factor
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    set210=(Token)input.LT(1);

                    if ( input.LA(1)==MINUS||input.LA(1)==PLUS||input.LA(1)==TILDE ) {
                        input.consume();
                        adaptor.addChild(root_0, 
                        (CommonTree)adaptor.create(set210)
                        );
                        state.errorRecovery=false;
                    }
                    else {
                        MismatchedSetException mse = new MismatchedSetException(null,input);
                        throw mse;
                    }


                    pushFollow(FOLLOW_factor_in_factor1902);
                    factor211=factor();

                    state._fsp--;

                    adaptor.addChild(root_0, factor211.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:332:4: power
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_power_in_factor1907);
                    power212=power();

                    state._fsp--;

                    adaptor.addChild(root_0, power212.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "factor"


    public static class power_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "power"
    // Python.g:335:1: power : atom ( trailer )* ( options {greedy=true; } : DOUBLESTAR factor )? ;
    public final PythonParser.power_return power() throws RecognitionException {
        PythonParser.power_return retval = new PythonParser.power_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token DOUBLESTAR215=null;
        PythonParser.atom_return atom213 =null;

        PythonParser.trailer_return trailer214 =null;

        PythonParser.factor_return factor216 =null;


        CommonTree DOUBLESTAR215_tree=null;

        try {
            // Python.g:336:2: ( atom ( trailer )* ( options {greedy=true; } : DOUBLESTAR factor )? )
            // Python.g:336:6: atom ( trailer )* ( options {greedy=true; } : DOUBLESTAR factor )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_atom_in_power1920);
            atom213=atom();

            state._fsp--;

            adaptor.addChild(root_0, atom213.getTree());

            // Python.g:336:11: ( trailer )*
            loop64:
            do {
                int alt64=2;
                int LA64_0 = input.LA(1);

                if ( (LA64_0==DOT||LA64_0==LBRACK||LA64_0==LPAREN) ) {
                    alt64=1;
                }


                switch (alt64) {
            	case 1 :
            	    // Python.g:336:12: trailer
            	    {
            	    pushFollow(FOLLOW_trailer_in_power1923);
            	    trailer214=trailer();

            	    state._fsp--;

            	    adaptor.addChild(root_0, trailer214.getTree());

            	    }
            	    break;

            	default :
            	    break loop64;
                }
            } while (true);


            // Python.g:336:22: ( options {greedy=true; } : DOUBLESTAR factor )?
            int alt65=2;
            int LA65_0 = input.LA(1);

            if ( (LA65_0==DOUBLESTAR) ) {
                alt65=1;
            }
            switch (alt65) {
                case 1 :
                    // Python.g:336:46: DOUBLESTAR factor
                    {
                    DOUBLESTAR215=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_power1935); 
                    DOUBLESTAR215_tree = 
                    (CommonTree)adaptor.create(DOUBLESTAR215)
                    ;
                    adaptor.addChild(root_0, DOUBLESTAR215_tree);


                    pushFollow(FOLLOW_factor_in_power1937);
                    factor216=factor();

                    state._fsp--;

                    adaptor.addChild(root_0, factor216.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "power"


    public static class atom_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "atom"
    // Python.g:339:1: atom : ( LPAREN ( testlist )? RPAREN -> ^( BRACKETED ( testlist )? ) | LBRACK ( listmaker )? RBRACK | LCURLY ( dictmaker )? RCURLY | BACKQUOTE testlist BACKQUOTE | NAME -> ^( VARIABLE NAME ) | INT | LONGINT | FLOAT | COMPLEX | ( STRING )+ );
    public final PythonParser.atom_return atom() throws RecognitionException {
        PythonParser.atom_return retval = new PythonParser.atom_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LPAREN217=null;
        Token RPAREN219=null;
        Token LBRACK220=null;
        Token RBRACK222=null;
        Token LCURLY223=null;
        Token RCURLY225=null;
        Token BACKQUOTE226=null;
        Token BACKQUOTE228=null;
        Token NAME229=null;
        Token INT230=null;
        Token LONGINT231=null;
        Token FLOAT232=null;
        Token COMPLEX233=null;
        Token STRING234=null;
        PythonParser.testlist_return testlist218 =null;

        PythonParser.listmaker_return listmaker221 =null;

        PythonParser.dictmaker_return dictmaker224 =null;

        PythonParser.testlist_return testlist227 =null;


        CommonTree LPAREN217_tree=null;
        CommonTree RPAREN219_tree=null;
        CommonTree LBRACK220_tree=null;
        CommonTree RBRACK222_tree=null;
        CommonTree LCURLY223_tree=null;
        CommonTree RCURLY225_tree=null;
        CommonTree BACKQUOTE226_tree=null;
        CommonTree BACKQUOTE228_tree=null;
        CommonTree NAME229_tree=null;
        CommonTree INT230_tree=null;
        CommonTree LONGINT231_tree=null;
        CommonTree FLOAT232_tree=null;
        CommonTree COMPLEX233_tree=null;
        CommonTree STRING234_tree=null;
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,"token NAME");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,"rule testlist");
        try {
            // Python.g:339:5: ( LPAREN ( testlist )? RPAREN -> ^( BRACKETED ( testlist )? ) | LBRACK ( listmaker )? RBRACK | LCURLY ( dictmaker )? RCURLY | BACKQUOTE testlist BACKQUOTE | NAME -> ^( VARIABLE NAME ) | INT | LONGINT | FLOAT | COMPLEX | ( STRING )+ )
            int alt70=10;
            switch ( input.LA(1) ) {
            case LPAREN:
                {
                alt70=1;
                }
                break;
            case LBRACK:
                {
                alt70=2;
                }
                break;
            case LCURLY:
                {
                alt70=3;
                }
                break;
            case BACKQUOTE:
                {
                alt70=4;
                }
                break;
            case NAME:
                {
                alt70=5;
                }
                break;
            case INT:
                {
                alt70=6;
                }
                break;
            case LONGINT:
                {
                alt70=7;
                }
                break;
            case FLOAT:
                {
                alt70=8;
                }
                break;
            case COMPLEX:
                {
                alt70=9;
                }
                break;
            case STRING:
                {
                alt70=10;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 70, 0, input);

                throw nvae;

            }

            switch (alt70) {
                case 1 :
                    // Python.g:339:7: LPAREN ( testlist )? RPAREN
                    {
                    LPAREN217=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_atom1948);  
                    stream_LPAREN.add(LPAREN217);


                    // Python.g:339:14: ( testlist )?
                    int alt66=2;
                    int LA66_0 = input.LA(1);

                    if ( (LA66_0==BACKQUOTE||LA66_0==COMPLEX||LA66_0==FLOAT||(LA66_0 >= INT && LA66_0 <= LCURLY)||(LA66_0 >= LONGINT && LA66_0 <= MINUS)||LA66_0==NAME||LA66_0==PLUS||LA66_0==STRING||LA66_0==TILDE||(LA66_0 >= 103 && LA66_0 <= 104)) ) {
                        alt66=1;
                    }
                    switch (alt66) {
                        case 1 :
                            // Python.g:339:15: testlist
                            {
                            pushFollow(FOLLOW_testlist_in_atom1951);
                            testlist218=testlist();

                            state._fsp--;

                            stream_testlist.add(testlist218.getTree());

                            }
                            break;

                    }


                    RPAREN219=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_atom1955);  
                    stream_RPAREN.add(RPAREN219);


                    // AST REWRITE
                    // elements: testlist
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 339:33: -> ^( BRACKETED ( testlist )? )
                    {
                        // Python.g:339:36: ^( BRACKETED ( testlist )? )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        (CommonTree)adaptor.create(BRACKETED, "BRACKETED")
                        , root_1);

                        // Python.g:339:48: ( testlist )?
                        if ( stream_testlist.hasNext() ) {
                            adaptor.addChild(root_1, stream_testlist.nextTree());

                        }
                        stream_testlist.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;
                case 2 :
                    // Python.g:340:4: LBRACK ( listmaker )? RBRACK
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LBRACK220=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_atom1971); 
                    LBRACK220_tree = 
                    (CommonTree)adaptor.create(LBRACK220)
                    ;
                    adaptor.addChild(root_0, LBRACK220_tree);


                    // Python.g:340:11: ( listmaker )?
                    int alt67=2;
                    int LA67_0 = input.LA(1);

                    if ( (LA67_0==BACKQUOTE||LA67_0==COMPLEX||LA67_0==FLOAT||(LA67_0 >= INT && LA67_0 <= LCURLY)||(LA67_0 >= LONGINT && LA67_0 <= MINUS)||LA67_0==NAME||LA67_0==PLUS||LA67_0==STRING||LA67_0==TILDE||(LA67_0 >= 103 && LA67_0 <= 104)) ) {
                        alt67=1;
                    }
                    switch (alt67) {
                        case 1 :
                            // Python.g:340:12: listmaker
                            {
                            pushFollow(FOLLOW_listmaker_in_atom1974);
                            listmaker221=listmaker();

                            state._fsp--;

                            adaptor.addChild(root_0, listmaker221.getTree());

                            }
                            break;

                    }


                    RBRACK222=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_atom1978); 
                    RBRACK222_tree = 
                    (CommonTree)adaptor.create(RBRACK222)
                    ;
                    adaptor.addChild(root_0, RBRACK222_tree);


                    }
                    break;
                case 3 :
                    // Python.g:341:4: LCURLY ( dictmaker )? RCURLY
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LCURLY223=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_atom1983); 
                    LCURLY223_tree = 
                    (CommonTree)adaptor.create(LCURLY223)
                    ;
                    adaptor.addChild(root_0, LCURLY223_tree);


                    // Python.g:341:11: ( dictmaker )?
                    int alt68=2;
                    int LA68_0 = input.LA(1);

                    if ( (LA68_0==BACKQUOTE||LA68_0==COMPLEX||LA68_0==FLOAT||(LA68_0 >= INT && LA68_0 <= LCURLY)||(LA68_0 >= LONGINT && LA68_0 <= MINUS)||LA68_0==NAME||LA68_0==PLUS||LA68_0==STRING||LA68_0==TILDE||(LA68_0 >= 103 && LA68_0 <= 104)) ) {
                        alt68=1;
                    }
                    switch (alt68) {
                        case 1 :
                            // Python.g:341:12: dictmaker
                            {
                            pushFollow(FOLLOW_dictmaker_in_atom1986);
                            dictmaker224=dictmaker();

                            state._fsp--;

                            adaptor.addChild(root_0, dictmaker224.getTree());

                            }
                            break;

                    }


                    RCURLY225=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_atom1990); 
                    RCURLY225_tree = 
                    (CommonTree)adaptor.create(RCURLY225)
                    ;
                    adaptor.addChild(root_0, RCURLY225_tree);


                    }
                    break;
                case 4 :
                    // Python.g:342:4: BACKQUOTE testlist BACKQUOTE
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    BACKQUOTE226=(Token)match(input,BACKQUOTE,FOLLOW_BACKQUOTE_in_atom1995); 
                    BACKQUOTE226_tree = 
                    (CommonTree)adaptor.create(BACKQUOTE226)
                    ;
                    adaptor.addChild(root_0, BACKQUOTE226_tree);


                    pushFollow(FOLLOW_testlist_in_atom1997);
                    testlist227=testlist();

                    state._fsp--;

                    adaptor.addChild(root_0, testlist227.getTree());

                    BACKQUOTE228=(Token)match(input,BACKQUOTE,FOLLOW_BACKQUOTE_in_atom1999); 
                    BACKQUOTE228_tree = 
                    (CommonTree)adaptor.create(BACKQUOTE228)
                    ;
                    adaptor.addChild(root_0, BACKQUOTE228_tree);


                    }
                    break;
                case 5 :
                    // Python.g:343:4: NAME
                    {
                    NAME229=(Token)match(input,NAME,FOLLOW_NAME_in_atom2004);  
                    stream_NAME.add(NAME229);


                    // AST REWRITE
                    // elements: NAME
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (CommonTree)adaptor.nil();
                    // 343:9: -> ^( VARIABLE NAME )
                    {
                        // Python.g:343:12: ^( VARIABLE NAME )
                        {
                        CommonTree root_1 = (CommonTree)adaptor.nil();
                        root_1 = (CommonTree)adaptor.becomeRoot(
                        (CommonTree)adaptor.create(VARIABLE, "VARIABLE")
                        , root_1);

                        adaptor.addChild(root_1, 
                        stream_NAME.nextNode()
                        );

                        adaptor.addChild(root_0, root_1);
                        }

                    }


                    retval.tree = root_0;

                    }
                    break;
                case 6 :
                    // Python.g:344:4: INT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    INT230=(Token)match(input,INT,FOLLOW_INT_in_atom2017); 
                    INT230_tree = 
                    (CommonTree)adaptor.create(INT230)
                    ;
                    adaptor.addChild(root_0, INT230_tree);


                    }
                    break;
                case 7 :
                    // Python.g:345:7: LONGINT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LONGINT231=(Token)match(input,LONGINT,FOLLOW_LONGINT_in_atom2025); 
                    LONGINT231_tree = 
                    (CommonTree)adaptor.create(LONGINT231)
                    ;
                    adaptor.addChild(root_0, LONGINT231_tree);


                    }
                    break;
                case 8 :
                    // Python.g:346:7: FLOAT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    FLOAT232=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_atom2033); 
                    FLOAT232_tree = 
                    (CommonTree)adaptor.create(FLOAT232)
                    ;
                    adaptor.addChild(root_0, FLOAT232_tree);


                    }
                    break;
                case 9 :
                    // Python.g:347:7: COMPLEX
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    COMPLEX233=(Token)match(input,COMPLEX,FOLLOW_COMPLEX_in_atom2041); 
                    COMPLEX233_tree = 
                    (CommonTree)adaptor.create(COMPLEX233)
                    ;
                    adaptor.addChild(root_0, COMPLEX233_tree);


                    }
                    break;
                case 10 :
                    // Python.g:348:4: ( STRING )+
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    // Python.g:348:4: ( STRING )+
                    int cnt69=0;
                    loop69:
                    do {
                        int alt69=2;
                        int LA69_0 = input.LA(1);

                        if ( (LA69_0==STRING) ) {
                            alt69=1;
                        }


                        switch (alt69) {
                    	case 1 :
                    	    // Python.g:348:5: STRING
                    	    {
                    	    STRING234=(Token)match(input,STRING,FOLLOW_STRING_in_atom2047); 
                    	    STRING234_tree = 
                    	    (CommonTree)adaptor.create(STRING234)
                    	    ;
                    	    adaptor.addChild(root_0, STRING234_tree);


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt69 >= 1 ) break loop69;
                                EarlyExitException eee =
                                    new EarlyExitException(69, input);
                                throw eee;
                        }
                        cnt69++;
                    } while (true);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "atom"


    public static class listmaker_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "listmaker"
    // Python.g:351:1: listmaker : test ( list_for | ( options {greedy=true; } : COMMA test )* ) ( COMMA )? ;
    public final PythonParser.listmaker_return listmaker() throws RecognitionException {
        PythonParser.listmaker_return retval = new PythonParser.listmaker_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA237=null;
        Token COMMA239=null;
        PythonParser.test_return test235 =null;

        PythonParser.list_for_return list_for236 =null;

        PythonParser.test_return test238 =null;


        CommonTree COMMA237_tree=null;
        CommonTree COMMA239_tree=null;

        try {
            // Python.g:351:10: ( test ( list_for | ( options {greedy=true; } : COMMA test )* ) ( COMMA )? )
            // Python.g:351:12: test ( list_for | ( options {greedy=true; } : COMMA test )* ) ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_test_in_listmaker2058);
            test235=test();

            state._fsp--;

            adaptor.addChild(root_0, test235.getTree());

            // Python.g:351:17: ( list_for | ( options {greedy=true; } : COMMA test )* )
            int alt72=2;
            int LA72_0 = input.LA(1);

            if ( (LA72_0==96) ) {
                alt72=1;
            }
            else if ( (LA72_0==COMMA||LA72_0==RBRACK) ) {
                alt72=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 72, 0, input);

                throw nvae;

            }
            switch (alt72) {
                case 1 :
                    // Python.g:351:19: list_for
                    {
                    pushFollow(FOLLOW_list_for_in_listmaker2062);
                    list_for236=list_for();

                    state._fsp--;

                    adaptor.addChild(root_0, list_for236.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:351:30: ( options {greedy=true; } : COMMA test )*
                    {
                    // Python.g:351:30: ( options {greedy=true; } : COMMA test )*
                    loop71:
                    do {
                        int alt71=2;
                        int LA71_0 = input.LA(1);

                        if ( (LA71_0==COMMA) ) {
                            int LA71_1 = input.LA(2);

                            if ( (LA71_1==BACKQUOTE||LA71_1==COMPLEX||LA71_1==FLOAT||(LA71_1 >= INT && LA71_1 <= LCURLY)||(LA71_1 >= LONGINT && LA71_1 <= MINUS)||LA71_1==NAME||LA71_1==PLUS||LA71_1==STRING||LA71_1==TILDE||(LA71_1 >= 103 && LA71_1 <= 104)) ) {
                                alt71=1;
                            }


                        }


                        switch (alt71) {
                    	case 1 :
                    	    // Python.g:351:54: COMMA test
                    	    {
                    	    COMMA237=(Token)match(input,COMMA,FOLLOW_COMMA_in_listmaker2074); 
                    	    COMMA237_tree = 
                    	    (CommonTree)adaptor.create(COMMA237)
                    	    ;
                    	    adaptor.addChild(root_0, COMMA237_tree);


                    	    pushFollow(FOLLOW_test_in_listmaker2076);
                    	    test238=test();

                    	    state._fsp--;

                    	    adaptor.addChild(root_0, test238.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop71;
                        }
                    } while (true);


                    }
                    break;

            }


            // Python.g:351:69: ( COMMA )?
            int alt73=2;
            int LA73_0 = input.LA(1);

            if ( (LA73_0==COMMA) ) {
                alt73=1;
            }
            switch (alt73) {
                case 1 :
                    // Python.g:351:70: COMMA
                    {
                    COMMA239=(Token)match(input,COMMA,FOLLOW_COMMA_in_listmaker2083); 
                    COMMA239_tree = 
                    (CommonTree)adaptor.create(COMMA239)
                    ;
                    adaptor.addChild(root_0, COMMA239_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "listmaker"


    public static class lambdef_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "lambdef"
    // Python.g:354:1: lambdef : 'lambda' ( varargslist )? COLON test ;
    public final PythonParser.lambdef_return lambdef() throws RecognitionException {
        PythonParser.lambdef_return retval = new PythonParser.lambdef_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal240=null;
        Token COLON242=null;
        PythonParser.varargslist_return varargslist241 =null;

        PythonParser.test_return test243 =null;


        CommonTree string_literal240_tree=null;
        CommonTree COLON242_tree=null;

        try {
            // Python.g:354:8: ( 'lambda' ( varargslist )? COLON test )
            // Python.g:354:10: 'lambda' ( varargslist )? COLON test
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal240=(Token)match(input,103,FOLLOW_103_in_lambdef2094); 
            string_literal240_tree = 
            (CommonTree)adaptor.create(string_literal240)
            ;
            adaptor.addChild(root_0, string_literal240_tree);


            // Python.g:354:19: ( varargslist )?
            int alt74=2;
            int LA74_0 = input.LA(1);

            if ( (LA74_0==DOUBLESTAR||LA74_0==LPAREN||LA74_0==NAME||LA74_0==STAR) ) {
                alt74=1;
            }
            switch (alt74) {
                case 1 :
                    // Python.g:354:20: varargslist
                    {
                    pushFollow(FOLLOW_varargslist_in_lambdef2097);
                    varargslist241=varargslist();

                    state._fsp--;

                    adaptor.addChild(root_0, varargslist241.getTree());

                    }
                    break;

            }


            COLON242=(Token)match(input,COLON,FOLLOW_COLON_in_lambdef2101); 
            COLON242_tree = 
            (CommonTree)adaptor.create(COLON242)
            ;
            adaptor.addChild(root_0, COLON242_tree);


            pushFollow(FOLLOW_test_in_lambdef2103);
            test243=test();

            state._fsp--;

            adaptor.addChild(root_0, test243.getTree());

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "lambdef"


    public static class trailer_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "trailer"
    // Python.g:357:1: trailer : ( LPAREN ( arglist )? RPAREN | LBRACK subscriptlist RBRACK | DOT NAME );
    public final PythonParser.trailer_return trailer() throws RecognitionException {
        PythonParser.trailer_return retval = new PythonParser.trailer_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LPAREN244=null;
        Token RPAREN246=null;
        Token LBRACK247=null;
        Token RBRACK249=null;
        Token DOT250=null;
        Token NAME251=null;
        PythonParser.arglist_return arglist245 =null;

        PythonParser.subscriptlist_return subscriptlist248 =null;


        CommonTree LPAREN244_tree=null;
        CommonTree RPAREN246_tree=null;
        CommonTree LBRACK247_tree=null;
        CommonTree RBRACK249_tree=null;
        CommonTree DOT250_tree=null;
        CommonTree NAME251_tree=null;

        try {
            // Python.g:357:8: ( LPAREN ( arglist )? RPAREN | LBRACK subscriptlist RBRACK | DOT NAME )
            int alt76=3;
            switch ( input.LA(1) ) {
            case LPAREN:
                {
                alt76=1;
                }
                break;
            case LBRACK:
                {
                alt76=2;
                }
                break;
            case DOT:
                {
                alt76=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 76, 0, input);

                throw nvae;

            }

            switch (alt76) {
                case 1 :
                    // Python.g:357:10: LPAREN ( arglist )? RPAREN
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LPAREN244=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_trailer2112); 
                    LPAREN244_tree = 
                    (CommonTree)adaptor.create(LPAREN244)
                    ;
                    adaptor.addChild(root_0, LPAREN244_tree);


                    // Python.g:357:17: ( arglist )?
                    int alt75=2;
                    int LA75_0 = input.LA(1);

                    if ( (LA75_0==BACKQUOTE||LA75_0==COMPLEX||LA75_0==DOUBLESTAR||LA75_0==FLOAT||(LA75_0 >= INT && LA75_0 <= LCURLY)||(LA75_0 >= LONGINT && LA75_0 <= MINUS)||LA75_0==NAME||LA75_0==PLUS||LA75_0==STAR||LA75_0==STRING||LA75_0==TILDE||(LA75_0 >= 103 && LA75_0 <= 104)) ) {
                        alt75=1;
                    }
                    switch (alt75) {
                        case 1 :
                            // Python.g:357:18: arglist
                            {
                            pushFollow(FOLLOW_arglist_in_trailer2115);
                            arglist245=arglist();

                            state._fsp--;

                            adaptor.addChild(root_0, arglist245.getTree());

                            }
                            break;

                    }


                    RPAREN246=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_trailer2119); 
                    RPAREN246_tree = 
                    (CommonTree)adaptor.create(RPAREN246)
                    ;
                    adaptor.addChild(root_0, RPAREN246_tree);


                    }
                    break;
                case 2 :
                    // Python.g:358:4: LBRACK subscriptlist RBRACK
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LBRACK247=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_trailer2124); 
                    LBRACK247_tree = 
                    (CommonTree)adaptor.create(LBRACK247)
                    ;
                    adaptor.addChild(root_0, LBRACK247_tree);


                    pushFollow(FOLLOW_subscriptlist_in_trailer2126);
                    subscriptlist248=subscriptlist();

                    state._fsp--;

                    adaptor.addChild(root_0, subscriptlist248.getTree());

                    RBRACK249=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_trailer2128); 
                    RBRACK249_tree = 
                    (CommonTree)adaptor.create(RBRACK249)
                    ;
                    adaptor.addChild(root_0, RBRACK249_tree);


                    }
                    break;
                case 3 :
                    // Python.g:359:4: DOT NAME
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    DOT250=(Token)match(input,DOT,FOLLOW_DOT_in_trailer2133); 
                    DOT250_tree = 
                    (CommonTree)adaptor.create(DOT250)
                    ;
                    adaptor.addChild(root_0, DOT250_tree);


                    NAME251=(Token)match(input,NAME,FOLLOW_NAME_in_trailer2135); 
                    NAME251_tree = 
                    (CommonTree)adaptor.create(NAME251)
                    ;
                    adaptor.addChild(root_0, NAME251_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "trailer"


    public static class subscriptlist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "subscriptlist"
    // Python.g:362:1: subscriptlist : subscript ( options {greedy=true; } : COMMA subscript )* ( COMMA )? ;
    public final PythonParser.subscriptlist_return subscriptlist() throws RecognitionException {
        PythonParser.subscriptlist_return retval = new PythonParser.subscriptlist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA253=null;
        Token COMMA255=null;
        PythonParser.subscript_return subscript252 =null;

        PythonParser.subscript_return subscript254 =null;


        CommonTree COMMA253_tree=null;
        CommonTree COMMA255_tree=null;

        try {
            // Python.g:363:5: ( subscript ( options {greedy=true; } : COMMA subscript )* ( COMMA )? )
            // Python.g:363:9: subscript ( options {greedy=true; } : COMMA subscript )* ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_subscript_in_subscriptlist2151);
            subscript252=subscript();

            state._fsp--;

            adaptor.addChild(root_0, subscript252.getTree());

            // Python.g:363:19: ( options {greedy=true; } : COMMA subscript )*
            loop77:
            do {
                int alt77=2;
                int LA77_0 = input.LA(1);

                if ( (LA77_0==COMMA) ) {
                    int LA77_1 = input.LA(2);

                    if ( (LA77_1==BACKQUOTE||LA77_1==COLON||LA77_1==COMPLEX||LA77_1==DOT||LA77_1==FLOAT||(LA77_1 >= INT && LA77_1 <= LCURLY)||(LA77_1 >= LONGINT && LA77_1 <= MINUS)||LA77_1==NAME||LA77_1==PLUS||LA77_1==STRING||LA77_1==TILDE||(LA77_1 >= 103 && LA77_1 <= 104)) ) {
                        alt77=1;
                    }


                }


                switch (alt77) {
            	case 1 :
            	    // Python.g:363:43: COMMA subscript
            	    {
            	    COMMA253=(Token)match(input,COMMA,FOLLOW_COMMA_in_subscriptlist2161); 
            	    COMMA253_tree = 
            	    (CommonTree)adaptor.create(COMMA253)
            	    ;
            	    adaptor.addChild(root_0, COMMA253_tree);


            	    pushFollow(FOLLOW_subscript_in_subscriptlist2163);
            	    subscript254=subscript();

            	    state._fsp--;

            	    adaptor.addChild(root_0, subscript254.getTree());

            	    }
            	    break;

            	default :
            	    break loop77;
                }
            } while (true);


            // Python.g:363:61: ( COMMA )?
            int alt78=2;
            int LA78_0 = input.LA(1);

            if ( (LA78_0==COMMA) ) {
                alt78=1;
            }
            switch (alt78) {
                case 1 :
                    // Python.g:363:62: COMMA
                    {
                    COMMA255=(Token)match(input,COMMA,FOLLOW_COMMA_in_subscriptlist2168); 
                    COMMA255_tree = 
                    (CommonTree)adaptor.create(COMMA255)
                    ;
                    adaptor.addChild(root_0, COMMA255_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "subscriptlist"


    public static class subscript_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "subscript"
    // Python.g:366:1: subscript : ( DOT DOT DOT | test ( COLON ( test )? ( sliceop )? )? | COLON ( test )? ( sliceop )? );
    public final PythonParser.subscript_return subscript() throws RecognitionException {
        PythonParser.subscript_return retval = new PythonParser.subscript_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token DOT256=null;
        Token DOT257=null;
        Token DOT258=null;
        Token COLON260=null;
        Token COLON263=null;
        PythonParser.test_return test259 =null;

        PythonParser.test_return test261 =null;

        PythonParser.sliceop_return sliceop262 =null;

        PythonParser.test_return test264 =null;

        PythonParser.sliceop_return sliceop265 =null;


        CommonTree DOT256_tree=null;
        CommonTree DOT257_tree=null;
        CommonTree DOT258_tree=null;
        CommonTree COLON260_tree=null;
        CommonTree COLON263_tree=null;

        try {
            // Python.g:367:2: ( DOT DOT DOT | test ( COLON ( test )? ( sliceop )? )? | COLON ( test )? ( sliceop )? )
            int alt84=3;
            switch ( input.LA(1) ) {
            case DOT:
                {
                alt84=1;
                }
                break;
            case BACKQUOTE:
            case COMPLEX:
            case FLOAT:
            case INT:
            case LBRACK:
            case LCURLY:
            case LONGINT:
            case LPAREN:
            case MINUS:
            case NAME:
            case PLUS:
            case STRING:
            case TILDE:
            case 103:
            case 104:
                {
                alt84=2;
                }
                break;
            case COLON:
                {
                alt84=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 84, 0, input);

                throw nvae;

            }

            switch (alt84) {
                case 1 :
                    // Python.g:367:4: DOT DOT DOT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    DOT256=(Token)match(input,DOT,FOLLOW_DOT_in_subscript2181); 
                    DOT256_tree = 
                    (CommonTree)adaptor.create(DOT256)
                    ;
                    adaptor.addChild(root_0, DOT256_tree);


                    DOT257=(Token)match(input,DOT,FOLLOW_DOT_in_subscript2183); 
                    DOT257_tree = 
                    (CommonTree)adaptor.create(DOT257)
                    ;
                    adaptor.addChild(root_0, DOT257_tree);


                    DOT258=(Token)match(input,DOT,FOLLOW_DOT_in_subscript2185); 
                    DOT258_tree = 
                    (CommonTree)adaptor.create(DOT258)
                    ;
                    adaptor.addChild(root_0, DOT258_tree);


                    }
                    break;
                case 2 :
                    // Python.g:368:7: test ( COLON ( test )? ( sliceop )? )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_test_in_subscript2193);
                    test259=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test259.getTree());

                    // Python.g:368:12: ( COLON ( test )? ( sliceop )? )?
                    int alt81=2;
                    int LA81_0 = input.LA(1);

                    if ( (LA81_0==COLON) ) {
                        alt81=1;
                    }
                    switch (alt81) {
                        case 1 :
                            // Python.g:368:13: COLON ( test )? ( sliceop )?
                            {
                            COLON260=(Token)match(input,COLON,FOLLOW_COLON_in_subscript2196); 
                            COLON260_tree = 
                            (CommonTree)adaptor.create(COLON260)
                            ;
                            adaptor.addChild(root_0, COLON260_tree);


                            // Python.g:368:19: ( test )?
                            int alt79=2;
                            int LA79_0 = input.LA(1);

                            if ( (LA79_0==BACKQUOTE||LA79_0==COMPLEX||LA79_0==FLOAT||(LA79_0 >= INT && LA79_0 <= LCURLY)||(LA79_0 >= LONGINT && LA79_0 <= MINUS)||LA79_0==NAME||LA79_0==PLUS||LA79_0==STRING||LA79_0==TILDE||(LA79_0 >= 103 && LA79_0 <= 104)) ) {
                                alt79=1;
                            }
                            switch (alt79) {
                                case 1 :
                                    // Python.g:368:20: test
                                    {
                                    pushFollow(FOLLOW_test_in_subscript2199);
                                    test261=test();

                                    state._fsp--;

                                    adaptor.addChild(root_0, test261.getTree());

                                    }
                                    break;

                            }


                            // Python.g:368:27: ( sliceop )?
                            int alt80=2;
                            int LA80_0 = input.LA(1);

                            if ( (LA80_0==COLON) ) {
                                alt80=1;
                            }
                            switch (alt80) {
                                case 1 :
                                    // Python.g:368:28: sliceop
                                    {
                                    pushFollow(FOLLOW_sliceop_in_subscript2204);
                                    sliceop262=sliceop();

                                    state._fsp--;

                                    adaptor.addChild(root_0, sliceop262.getTree());

                                    }
                                    break;

                            }


                            }
                            break;

                    }


                    }
                    break;
                case 3 :
                    // Python.g:369:7: COLON ( test )? ( sliceop )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    COLON263=(Token)match(input,COLON,FOLLOW_COLON_in_subscript2216); 
                    COLON263_tree = 
                    (CommonTree)adaptor.create(COLON263)
                    ;
                    adaptor.addChild(root_0, COLON263_tree);


                    // Python.g:369:13: ( test )?
                    int alt82=2;
                    int LA82_0 = input.LA(1);

                    if ( (LA82_0==BACKQUOTE||LA82_0==COMPLEX||LA82_0==FLOAT||(LA82_0 >= INT && LA82_0 <= LCURLY)||(LA82_0 >= LONGINT && LA82_0 <= MINUS)||LA82_0==NAME||LA82_0==PLUS||LA82_0==STRING||LA82_0==TILDE||(LA82_0 >= 103 && LA82_0 <= 104)) ) {
                        alt82=1;
                    }
                    switch (alt82) {
                        case 1 :
                            // Python.g:369:14: test
                            {
                            pushFollow(FOLLOW_test_in_subscript2219);
                            test264=test();

                            state._fsp--;

                            adaptor.addChild(root_0, test264.getTree());

                            }
                            break;

                    }


                    // Python.g:369:21: ( sliceop )?
                    int alt83=2;
                    int LA83_0 = input.LA(1);

                    if ( (LA83_0==COLON) ) {
                        alt83=1;
                    }
                    switch (alt83) {
                        case 1 :
                            // Python.g:369:22: sliceop
                            {
                            pushFollow(FOLLOW_sliceop_in_subscript2224);
                            sliceop265=sliceop();

                            state._fsp--;

                            adaptor.addChild(root_0, sliceop265.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "subscript"


    public static class sliceop_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "sliceop"
    // Python.g:372:1: sliceop : COLON ( test )? ;
    public final PythonParser.sliceop_return sliceop() throws RecognitionException {
        PythonParser.sliceop_return retval = new PythonParser.sliceop_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COLON266=null;
        PythonParser.test_return test267 =null;


        CommonTree COLON266_tree=null;

        try {
            // Python.g:372:8: ( COLON ( test )? )
            // Python.g:372:10: COLON ( test )?
            {
            root_0 = (CommonTree)adaptor.nil();


            COLON266=(Token)match(input,COLON,FOLLOW_COLON_in_sliceop2238); 
            COLON266_tree = 
            (CommonTree)adaptor.create(COLON266)
            ;
            adaptor.addChild(root_0, COLON266_tree);


            // Python.g:372:16: ( test )?
            int alt85=2;
            int LA85_0 = input.LA(1);

            if ( (LA85_0==BACKQUOTE||LA85_0==COMPLEX||LA85_0==FLOAT||(LA85_0 >= INT && LA85_0 <= LCURLY)||(LA85_0 >= LONGINT && LA85_0 <= MINUS)||LA85_0==NAME||LA85_0==PLUS||LA85_0==STRING||LA85_0==TILDE||(LA85_0 >= 103 && LA85_0 <= 104)) ) {
                alt85=1;
            }
            switch (alt85) {
                case 1 :
                    // Python.g:372:17: test
                    {
                    pushFollow(FOLLOW_test_in_sliceop2241);
                    test267=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test267.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "sliceop"


    public static class exprlist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "exprlist"
    // Python.g:375:1: exprlist : expr ( options {k=2; } : COMMA expr )* ( COMMA )? ;
    public final PythonParser.exprlist_return exprlist() throws RecognitionException {
        PythonParser.exprlist_return retval = new PythonParser.exprlist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA269=null;
        Token COMMA271=null;
        PythonParser.expr_return expr268 =null;

        PythonParser.expr_return expr270 =null;


        CommonTree COMMA269_tree=null;
        CommonTree COMMA271_tree=null;

        try {
            // Python.g:376:5: ( expr ( options {k=2; } : COMMA expr )* ( COMMA )? )
            // Python.g:376:9: expr ( options {k=2; } : COMMA expr )* ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_expr_in_exprlist2259);
            expr268=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr268.getTree());

            // Python.g:376:14: ( options {k=2; } : COMMA expr )*
            loop86:
            do {
                int alt86=2;
                int LA86_0 = input.LA(1);

                if ( (LA86_0==COMMA) ) {
                    int LA86_1 = input.LA(2);

                    if ( (LA86_1==BACKQUOTE||LA86_1==COMPLEX||LA86_1==FLOAT||(LA86_1 >= INT && LA86_1 <= LCURLY)||(LA86_1 >= LONGINT && LA86_1 <= MINUS)||LA86_1==NAME||LA86_1==PLUS||LA86_1==STRING||LA86_1==TILDE) ) {
                        alt86=1;
                    }


                }


                switch (alt86) {
            	case 1 :
            	    // Python.g:376:30: COMMA expr
            	    {
            	    COMMA269=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprlist2269); 
            	    COMMA269_tree = 
            	    (CommonTree)adaptor.create(COMMA269)
            	    ;
            	    adaptor.addChild(root_0, COMMA269_tree);


            	    pushFollow(FOLLOW_expr_in_exprlist2271);
            	    expr270=expr();

            	    state._fsp--;

            	    adaptor.addChild(root_0, expr270.getTree());

            	    }
            	    break;

            	default :
            	    break loop86;
                }
            } while (true);


            // Python.g:376:43: ( COMMA )?
            int alt87=2;
            int LA87_0 = input.LA(1);

            if ( (LA87_0==COMMA) ) {
                alt87=1;
            }
            switch (alt87) {
                case 1 :
                    // Python.g:376:44: COMMA
                    {
                    COMMA271=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprlist2276); 
                    COMMA271_tree = 
                    (CommonTree)adaptor.create(COMMA271)
                    ;
                    adaptor.addChild(root_0, COMMA271_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "exprlist"


    public static class testlist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "testlist"
    // Python.g:379:1: testlist : at= test ( options {k=2; } :ac= COMMA bt= test )* ( COMMA )? ;
    public final PythonParser.testlist_return testlist() throws RecognitionException {
        PythonParser.testlist_return retval = new PythonParser.testlist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token ac=null;
        Token COMMA272=null;
        PythonParser.test_return at =null;

        PythonParser.test_return bt =null;


        CommonTree ac_tree=null;
        CommonTree COMMA272_tree=null;

        try {
            // Python.g:380:5: (at= test ( options {k=2; } :ac= COMMA bt= test )* ( COMMA )? )
            // Python.g:380:9: at= test ( options {k=2; } :ac= COMMA bt= test )* ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_test_in_testlist2296);
            at=test();

            state._fsp--;

            adaptor.addChild(root_0, at.getTree());

            // Python.g:380:17: ( options {k=2; } :ac= COMMA bt= test )*
            loop88:
            do {
                int alt88=2;
                int LA88_0 = input.LA(1);

                if ( (LA88_0==COMMA) ) {
                    int LA88_1 = input.LA(2);

                    if ( (LA88_1==BACKQUOTE) ) {
                        alt88=1;
                    }
                    else if ( (LA88_1==COMPLEX||LA88_1==FLOAT||(LA88_1 >= INT && LA88_1 <= LCURLY)||(LA88_1 >= LONGINT && LA88_1 <= MINUS)||LA88_1==NAME||LA88_1==PLUS||LA88_1==STRING||LA88_1==TILDE||(LA88_1 >= 103 && LA88_1 <= 104)) ) {
                        alt88=1;
                    }


                }


                switch (alt88) {
            	case 1 :
            	    // Python.g:380:34: ac= COMMA bt= test
            	    {
            	    ac=(Token)match(input,COMMA,FOLLOW_COMMA_in_testlist2309); 
            	    ac_tree = 
            	    (CommonTree)adaptor.create(ac)
            	    ;
            	    adaptor.addChild(root_0, ac_tree);


            	    pushFollow(FOLLOW_test_in_testlist2313);
            	    bt=test();

            	    state._fsp--;

            	    adaptor.addChild(root_0, bt.getTree());

            	    }
            	    break;

            	default :
            	    break loop88;
                }
            } while (true);


            // Python.g:380:53: ( COMMA )?
            int alt89=2;
            int LA89_0 = input.LA(1);

            if ( (LA89_0==COMMA) ) {
                alt89=1;
            }
            switch (alt89) {
                case 1 :
                    // Python.g:380:54: COMMA
                    {
                    COMMA272=(Token)match(input,COMMA,FOLLOW_COMMA_in_testlist2318); 
                    COMMA272_tree = 
                    (CommonTree)adaptor.create(COMMA272)
                    ;
                    adaptor.addChild(root_0, COMMA272_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "testlist"


    public static class dictmaker_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "dictmaker"
    // Python.g:384:1: dictmaker : test COLON test ( options {k=2; } : COMMA test COLON test )* ( COMMA )? ;
    public final PythonParser.dictmaker_return dictmaker() throws RecognitionException {
        PythonParser.dictmaker_return retval = new PythonParser.dictmaker_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COLON274=null;
        Token COMMA276=null;
        Token COLON278=null;
        Token COMMA280=null;
        PythonParser.test_return test273 =null;

        PythonParser.test_return test275 =null;

        PythonParser.test_return test277 =null;

        PythonParser.test_return test279 =null;


        CommonTree COLON274_tree=null;
        CommonTree COMMA276_tree=null;
        CommonTree COLON278_tree=null;
        CommonTree COMMA280_tree=null;

        try {
            // Python.g:385:5: ( test COLON test ( options {k=2; } : COMMA test COLON test )* ( COMMA )? )
            // Python.g:385:9: test COLON test ( options {k=2; } : COMMA test COLON test )* ( COMMA )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_test_in_dictmaker2346);
            test273=test();

            state._fsp--;

            adaptor.addChild(root_0, test273.getTree());

            COLON274=(Token)match(input,COLON,FOLLOW_COLON_in_dictmaker2348); 
            COLON274_tree = 
            (CommonTree)adaptor.create(COLON274)
            ;
            adaptor.addChild(root_0, COLON274_tree);


            pushFollow(FOLLOW_test_in_dictmaker2350);
            test275=test();

            state._fsp--;

            adaptor.addChild(root_0, test275.getTree());

            // Python.g:386:9: ( options {k=2; } : COMMA test COLON test )*
            loop90:
            do {
                int alt90=2;
                int LA90_0 = input.LA(1);

                if ( (LA90_0==COMMA) ) {
                    int LA90_1 = input.LA(2);

                    if ( (LA90_1==BACKQUOTE||LA90_1==COMPLEX||LA90_1==FLOAT||(LA90_1 >= INT && LA90_1 <= LCURLY)||(LA90_1 >= LONGINT && LA90_1 <= MINUS)||LA90_1==NAME||LA90_1==PLUS||LA90_1==STRING||LA90_1==TILDE||(LA90_1 >= 103 && LA90_1 <= 104)) ) {
                        alt90=1;
                    }


                }


                switch (alt90) {
            	case 1 :
            	    // Python.g:386:25: COMMA test COLON test
            	    {
            	    COMMA276=(Token)match(input,COMMA,FOLLOW_COMMA_in_dictmaker2368); 
            	    COMMA276_tree = 
            	    (CommonTree)adaptor.create(COMMA276)
            	    ;
            	    adaptor.addChild(root_0, COMMA276_tree);


            	    pushFollow(FOLLOW_test_in_dictmaker2370);
            	    test277=test();

            	    state._fsp--;

            	    adaptor.addChild(root_0, test277.getTree());

            	    COLON278=(Token)match(input,COLON,FOLLOW_COLON_in_dictmaker2372); 
            	    COLON278_tree = 
            	    (CommonTree)adaptor.create(COLON278)
            	    ;
            	    adaptor.addChild(root_0, COLON278_tree);


            	    pushFollow(FOLLOW_test_in_dictmaker2374);
            	    test279=test();

            	    state._fsp--;

            	    adaptor.addChild(root_0, test279.getTree());

            	    }
            	    break;

            	default :
            	    break loop90;
                }
            } while (true);


            // Python.g:386:49: ( COMMA )?
            int alt91=2;
            int LA91_0 = input.LA(1);

            if ( (LA91_0==COMMA) ) {
                alt91=1;
            }
            switch (alt91) {
                case 1 :
                    // Python.g:386:50: COMMA
                    {
                    COMMA280=(Token)match(input,COMMA,FOLLOW_COMMA_in_dictmaker2379); 
                    COMMA280_tree = 
                    (CommonTree)adaptor.create(COMMA280)
                    ;
                    adaptor.addChild(root_0, COMMA280_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "dictmaker"


    public static class classdef_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "classdef"
    // Python.g:389:1: classdef : 'class' NAME ( LPAREN testlist RPAREN )? COLON suite -> ^( CLASS_DEF NAME suite ( testlist )? ) ;
    public final PythonParser.classdef_return classdef() throws RecognitionException {
        PythonParser.classdef_return retval = new PythonParser.classdef_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal281=null;
        Token NAME282=null;
        Token LPAREN283=null;
        Token RPAREN285=null;
        Token COLON286=null;
        PythonParser.testlist_return testlist284 =null;

        PythonParser.suite_return suite287 =null;


        CommonTree string_literal281_tree=null;
        CommonTree NAME282_tree=null;
        CommonTree LPAREN283_tree=null;
        CommonTree RPAREN285_tree=null;
        CommonTree COLON286_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,"token NAME");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleTokenStream stream_87=new RewriteRuleTokenStream(adaptor,"token 87");
        RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,"rule suite");
        RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,"rule testlist");
        try {
            // Python.g:389:9: ( 'class' NAME ( LPAREN testlist RPAREN )? COLON suite -> ^( CLASS_DEF NAME suite ( testlist )? ) )
            // Python.g:389:11: 'class' NAME ( LPAREN testlist RPAREN )? COLON suite
            {
            string_literal281=(Token)match(input,87,FOLLOW_87_in_classdef2393);  
            stream_87.add(string_literal281);


            NAME282=(Token)match(input,NAME,FOLLOW_NAME_in_classdef2395);  
            stream_NAME.add(NAME282);


            // Python.g:389:24: ( LPAREN testlist RPAREN )?
            int alt92=2;
            int LA92_0 = input.LA(1);

            if ( (LA92_0==LPAREN) ) {
                alt92=1;
            }
            switch (alt92) {
                case 1 :
                    // Python.g:389:25: LPAREN testlist RPAREN
                    {
                    LPAREN283=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_classdef2398);  
                    stream_LPAREN.add(LPAREN283);


                    pushFollow(FOLLOW_testlist_in_classdef2400);
                    testlist284=testlist();

                    state._fsp--;

                    stream_testlist.add(testlist284.getTree());

                    RPAREN285=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_classdef2402);  
                    stream_RPAREN.add(RPAREN285);


                    }
                    break;

            }


            COLON286=(Token)match(input,COLON,FOLLOW_COLON_in_classdef2406);  
            stream_COLON.add(COLON286);


            pushFollow(FOLLOW_suite_in_classdef2408);
            suite287=suite();

            state._fsp--;

            stream_suite.add(suite287.getTree());

            // AST REWRITE
            // elements: NAME, suite, testlist
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 390:4: -> ^( CLASS_DEF NAME suite ( testlist )? )
            {
                // Python.g:390:7: ^( CLASS_DEF NAME suite ( testlist )? )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(CLASS_DEF, "CLASS_DEF")
                , root_1);

                adaptor.addChild(root_1, 
                stream_NAME.nextNode()
                );

                adaptor.addChild(root_1, stream_suite.nextTree());

                // Python.g:390:30: ( testlist )?
                if ( stream_testlist.hasNext() ) {
                    adaptor.addChild(root_1, stream_testlist.nextTree());

                }
                stream_testlist.reset();

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "classdef"


    public static class arglist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "arglist"
    // Python.g:394:1: arglist : ( argument ( COMMA argument )* ( COMMA ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )? )? | STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test );
    public final PythonParser.arglist_return arglist() throws RecognitionException {
        PythonParser.arglist_return retval = new PythonParser.arglist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA289=null;
        Token COMMA291=null;
        Token STAR292=null;
        Token COMMA294=null;
        Token DOUBLESTAR295=null;
        Token DOUBLESTAR297=null;
        Token STAR299=null;
        Token COMMA301=null;
        Token DOUBLESTAR302=null;
        Token DOUBLESTAR304=null;
        PythonParser.argument_return argument288 =null;

        PythonParser.argument_return argument290 =null;

        PythonParser.test_return test293 =null;

        PythonParser.test_return test296 =null;

        PythonParser.test_return test298 =null;

        PythonParser.test_return test300 =null;

        PythonParser.test_return test303 =null;

        PythonParser.test_return test305 =null;


        CommonTree COMMA289_tree=null;
        CommonTree COMMA291_tree=null;
        CommonTree STAR292_tree=null;
        CommonTree COMMA294_tree=null;
        CommonTree DOUBLESTAR295_tree=null;
        CommonTree DOUBLESTAR297_tree=null;
        CommonTree STAR299_tree=null;
        CommonTree COMMA301_tree=null;
        CommonTree DOUBLESTAR302_tree=null;
        CommonTree DOUBLESTAR304_tree=null;

        try {
            // Python.g:394:8: ( argument ( COMMA argument )* ( COMMA ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )? )? | STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )
            int alt98=3;
            switch ( input.LA(1) ) {
            case BACKQUOTE:
            case COMPLEX:
            case FLOAT:
            case INT:
            case LBRACK:
            case LCURLY:
            case LONGINT:
            case LPAREN:
            case MINUS:
            case NAME:
            case PLUS:
            case STRING:
            case TILDE:
            case 103:
            case 104:
                {
                alt98=1;
                }
                break;
            case STAR:
                {
                alt98=2;
                }
                break;
            case DOUBLESTAR:
                {
                alt98=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 98, 0, input);

                throw nvae;

            }

            switch (alt98) {
                case 1 :
                    // Python.g:394:10: argument ( COMMA argument )* ( COMMA ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )? )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_argument_in_arglist2436);
                    argument288=argument();

                    state._fsp--;

                    adaptor.addChild(root_0, argument288.getTree());

                    // Python.g:394:19: ( COMMA argument )*
                    loop93:
                    do {
                        int alt93=2;
                        int LA93_0 = input.LA(1);

                        if ( (LA93_0==COMMA) ) {
                            int LA93_1 = input.LA(2);

                            if ( (LA93_1==BACKQUOTE||LA93_1==COMPLEX||LA93_1==FLOAT||(LA93_1 >= INT && LA93_1 <= LCURLY)||(LA93_1 >= LONGINT && LA93_1 <= MINUS)||LA93_1==NAME||LA93_1==PLUS||LA93_1==STRING||LA93_1==TILDE||(LA93_1 >= 103 && LA93_1 <= 104)) ) {
                                alt93=1;
                            }


                        }


                        switch (alt93) {
                    	case 1 :
                    	    // Python.g:394:20: COMMA argument
                    	    {
                    	    COMMA289=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist2439); 
                    	    COMMA289_tree = 
                    	    (CommonTree)adaptor.create(COMMA289)
                    	    ;
                    	    adaptor.addChild(root_0, COMMA289_tree);


                    	    pushFollow(FOLLOW_argument_in_arglist2441);
                    	    argument290=argument();

                    	    state._fsp--;

                    	    adaptor.addChild(root_0, argument290.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop93;
                        }
                    } while (true);


                    // Python.g:395:9: ( COMMA ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )? )?
                    int alt96=2;
                    int LA96_0 = input.LA(1);

                    if ( (LA96_0==COMMA) ) {
                        alt96=1;
                    }
                    switch (alt96) {
                        case 1 :
                            // Python.g:395:11: COMMA ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )?
                            {
                            COMMA291=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist2455); 
                            COMMA291_tree = 
                            (CommonTree)adaptor.create(COMMA291)
                            ;
                            adaptor.addChild(root_0, COMMA291_tree);


                            // Python.g:396:11: ( STAR test ( COMMA DOUBLESTAR test )? | DOUBLESTAR test )?
                            int alt95=3;
                            int LA95_0 = input.LA(1);

                            if ( (LA95_0==STAR) ) {
                                alt95=1;
                            }
                            else if ( (LA95_0==DOUBLESTAR) ) {
                                alt95=2;
                            }
                            switch (alt95) {
                                case 1 :
                                    // Python.g:396:13: STAR test ( COMMA DOUBLESTAR test )?
                                    {
                                    STAR292=(Token)match(input,STAR,FOLLOW_STAR_in_arglist2469); 
                                    STAR292_tree = 
                                    (CommonTree)adaptor.create(STAR292)
                                    ;
                                    adaptor.addChild(root_0, STAR292_tree);


                                    pushFollow(FOLLOW_test_in_arglist2471);
                                    test293=test();

                                    state._fsp--;

                                    adaptor.addChild(root_0, test293.getTree());

                                    // Python.g:396:23: ( COMMA DOUBLESTAR test )?
                                    int alt94=2;
                                    int LA94_0 = input.LA(1);

                                    if ( (LA94_0==COMMA) ) {
                                        alt94=1;
                                    }
                                    switch (alt94) {
                                        case 1 :
                                            // Python.g:396:24: COMMA DOUBLESTAR test
                                            {
                                            COMMA294=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist2474); 
                                            COMMA294_tree = 
                                            (CommonTree)adaptor.create(COMMA294)
                                            ;
                                            adaptor.addChild(root_0, COMMA294_tree);


                                            DOUBLESTAR295=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist2476); 
                                            DOUBLESTAR295_tree = 
                                            (CommonTree)adaptor.create(DOUBLESTAR295)
                                            ;
                                            adaptor.addChild(root_0, DOUBLESTAR295_tree);


                                            pushFollow(FOLLOW_test_in_arglist2478);
                                            test296=test();

                                            state._fsp--;

                                            adaptor.addChild(root_0, test296.getTree());

                                            }
                                            break;

                                    }


                                    }
                                    break;
                                case 2 :
                                    // Python.g:397:13: DOUBLESTAR test
                                    {
                                    DOUBLESTAR297=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist2494); 
                                    DOUBLESTAR297_tree = 
                                    (CommonTree)adaptor.create(DOUBLESTAR297)
                                    ;
                                    adaptor.addChild(root_0, DOUBLESTAR297_tree);


                                    pushFollow(FOLLOW_test_in_arglist2496);
                                    test298=test();

                                    state._fsp--;

                                    adaptor.addChild(root_0, test298.getTree());

                                    }
                                    break;

                            }


                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // Python.g:400:9: STAR test ( COMMA DOUBLESTAR test )?
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    STAR299=(Token)match(input,STAR,FOLLOW_STAR_in_arglist2530); 
                    STAR299_tree = 
                    (CommonTree)adaptor.create(STAR299)
                    ;
                    adaptor.addChild(root_0, STAR299_tree);


                    pushFollow(FOLLOW_test_in_arglist2532);
                    test300=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test300.getTree());

                    // Python.g:400:19: ( COMMA DOUBLESTAR test )?
                    int alt97=2;
                    int LA97_0 = input.LA(1);

                    if ( (LA97_0==COMMA) ) {
                        alt97=1;
                    }
                    switch (alt97) {
                        case 1 :
                            // Python.g:400:20: COMMA DOUBLESTAR test
                            {
                            COMMA301=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist2535); 
                            COMMA301_tree = 
                            (CommonTree)adaptor.create(COMMA301)
                            ;
                            adaptor.addChild(root_0, COMMA301_tree);


                            DOUBLESTAR302=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist2537); 
                            DOUBLESTAR302_tree = 
                            (CommonTree)adaptor.create(DOUBLESTAR302)
                            ;
                            adaptor.addChild(root_0, DOUBLESTAR302_tree);


                            pushFollow(FOLLOW_test_in_arglist2539);
                            test303=test();

                            state._fsp--;

                            adaptor.addChild(root_0, test303.getTree());

                            }
                            break;

                    }


                    }
                    break;
                case 3 :
                    // Python.g:401:9: DOUBLESTAR test
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    DOUBLESTAR304=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist2551); 
                    DOUBLESTAR304_tree = 
                    (CommonTree)adaptor.create(DOUBLESTAR304)
                    ;
                    adaptor.addChild(root_0, DOUBLESTAR304_tree);


                    pushFollow(FOLLOW_test_in_arglist2553);
                    test305=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test305.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "arglist"


    public static class argument_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "argument"
    // Python.g:404:1: argument : test ( ASSIGN test )? ;
    public final PythonParser.argument_return argument() throws RecognitionException {
        PythonParser.argument_return retval = new PythonParser.argument_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token ASSIGN307=null;
        PythonParser.test_return test306 =null;

        PythonParser.test_return test308 =null;


        CommonTree ASSIGN307_tree=null;

        try {
            // Python.g:404:10: ( test ( ASSIGN test )? )
            // Python.g:404:12: test ( ASSIGN test )?
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_test_in_argument2566);
            test306=test();

            state._fsp--;

            adaptor.addChild(root_0, test306.getTree());

            // Python.g:404:17: ( ASSIGN test )?
            int alt99=2;
            int LA99_0 = input.LA(1);

            if ( (LA99_0==ASSIGN) ) {
                alt99=1;
            }
            switch (alt99) {
                case 1 :
                    // Python.g:404:18: ASSIGN test
                    {
                    ASSIGN307=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_argument2569); 
                    ASSIGN307_tree = 
                    (CommonTree)adaptor.create(ASSIGN307)
                    ;
                    adaptor.addChild(root_0, ASSIGN307_tree);


                    pushFollow(FOLLOW_test_in_argument2571);
                    test308=test();

                    state._fsp--;

                    adaptor.addChild(root_0, test308.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "argument"


    public static class list_iter_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "list_iter"
    // Python.g:407:1: list_iter : ( list_for | list_if );
    public final PythonParser.list_iter_return list_iter() throws RecognitionException {
        PythonParser.list_iter_return retval = new PythonParser.list_iter_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        PythonParser.list_for_return list_for309 =null;

        PythonParser.list_if_return list_if310 =null;



        try {
            // Python.g:407:10: ( list_for | list_if )
            int alt100=2;
            int LA100_0 = input.LA(1);

            if ( (LA100_0==96) ) {
                alt100=1;
            }
            else if ( (LA100_0==99) ) {
                alt100=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 100, 0, input);

                throw nvae;

            }
            switch (alt100) {
                case 1 :
                    // Python.g:407:12: list_for
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_list_for_in_list_iter2590);
                    list_for309=list_for();

                    state._fsp--;

                    adaptor.addChild(root_0, list_for309.getTree());

                    }
                    break;
                case 2 :
                    // Python.g:408:4: list_if
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_list_if_in_list_iter2595);
                    list_if310=list_if();

                    state._fsp--;

                    adaptor.addChild(root_0, list_if310.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "list_iter"


    public static class list_for_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "list_for"
    // Python.g:411:1: list_for : 'for' exprlist 'in' testlist ( list_iter )? ;
    public final PythonParser.list_for_return list_for() throws RecognitionException {
        PythonParser.list_for_return retval = new PythonParser.list_for_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal311=null;
        Token string_literal313=null;
        PythonParser.exprlist_return exprlist312 =null;

        PythonParser.testlist_return testlist314 =null;

        PythonParser.list_iter_return list_iter315 =null;


        CommonTree string_literal311_tree=null;
        CommonTree string_literal313_tree=null;

        try {
            // Python.g:411:9: ( 'for' exprlist 'in' testlist ( list_iter )? )
            // Python.g:411:11: 'for' exprlist 'in' testlist ( list_iter )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal311=(Token)match(input,96,FOLLOW_96_in_list_for2604); 
            string_literal311_tree = 
            (CommonTree)adaptor.create(string_literal311)
            ;
            adaptor.addChild(root_0, string_literal311_tree);


            pushFollow(FOLLOW_exprlist_in_list_for2606);
            exprlist312=exprlist();

            state._fsp--;

            adaptor.addChild(root_0, exprlist312.getTree());

            string_literal313=(Token)match(input,101,FOLLOW_101_in_list_for2608); 
            string_literal313_tree = 
            (CommonTree)adaptor.create(string_literal313)
            ;
            adaptor.addChild(root_0, string_literal313_tree);


            pushFollow(FOLLOW_testlist_in_list_for2610);
            testlist314=testlist();

            state._fsp--;

            adaptor.addChild(root_0, testlist314.getTree());

            // Python.g:411:40: ( list_iter )?
            int alt101=2;
            int LA101_0 = input.LA(1);

            if ( (LA101_0==96||LA101_0==99) ) {
                alt101=1;
            }
            switch (alt101) {
                case 1 :
                    // Python.g:411:41: list_iter
                    {
                    pushFollow(FOLLOW_list_iter_in_list_for2613);
                    list_iter315=list_iter();

                    state._fsp--;

                    adaptor.addChild(root_0, list_iter315.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "list_for"


    public static class list_if_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "list_if"
    // Python.g:414:1: list_if : 'if' test ( list_iter )? ;
    public final PythonParser.list_if_return list_if() throws RecognitionException {
        PythonParser.list_if_return retval = new PythonParser.list_if_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal316=null;
        PythonParser.test_return test317 =null;

        PythonParser.list_iter_return list_iter318 =null;


        CommonTree string_literal316_tree=null;

        try {
            // Python.g:414:8: ( 'if' test ( list_iter )? )
            // Python.g:414:10: 'if' test ( list_iter )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal316=(Token)match(input,99,FOLLOW_99_in_list_if2624); 
            string_literal316_tree = 
            (CommonTree)adaptor.create(string_literal316)
            ;
            adaptor.addChild(root_0, string_literal316_tree);


            pushFollow(FOLLOW_test_in_list_if2626);
            test317=test();

            state._fsp--;

            adaptor.addChild(root_0, test317.getTree());

            // Python.g:414:20: ( list_iter )?
            int alt102=2;
            int LA102_0 = input.LA(1);

            if ( (LA102_0==96||LA102_0==99) ) {
                alt102=1;
            }
            switch (alt102) {
                case 1 :
                    // Python.g:414:21: list_iter
                    {
                    pushFollow(FOLLOW_list_iter_in_list_if2629);
                    list_iter318=list_iter();

                    state._fsp--;

                    adaptor.addChild(root_0, list_iter318.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "list_if"

    // Delegated rules


 

    public static final BitSet FOLLOW_NEWLINE_in_single_input244 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_simple_stmt_in_single_input249 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_compound_stmt_in_single_input254 = new BitSet(new long[]{0x0040000000000000L});
    public static final BitSet FOLLOW_NEWLINE_in_single_input256 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NEWLINE_in_file_input273 = new BitSet(new long[]{0x086E0E0200020102L,0x0001FD9F47E01400L});
    public static final BitSet FOLLOW_stmt_in_file_input277 = new BitSet(new long[]{0x086E0E0200020102L,0x0001FD9F47E01400L});
    public static final BitSet FOLLOW_NEWLINE_in_eval_input296 = new BitSet(new long[]{0x086E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_eval_input300 = new BitSet(new long[]{0x0040000000000002L});
    public static final BitSet FOLLOW_NEWLINE_in_eval_input303 = new BitSet(new long[]{0x0040000000000002L});
    public static final BitSet FOLLOW_89_in_funcdef321 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_funcdef323 = new BitSet(new long[]{0x0004000000000000L});
    public static final BitSet FOLLOW_parameters_in_funcdef325 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_funcdef327 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_funcdef329 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_parameters355 = new BitSet(new long[]{0x0024000002000000L,0x0000000000000084L});
    public static final BitSet FOLLOW_varargslist_in_parameters358 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_RPAREN_in_parameters362 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_defparameter_in_varargslist389 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_varargslist399 = new BitSet(new long[]{0x0024000000000000L});
    public static final BitSet FOLLOW_defparameter_in_varargslist401 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_varargslist414 = new BitSet(new long[]{0x0000000002000002L,0x0000000000000080L});
    public static final BitSet FOLLOW_STAR_in_varargslist430 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist432 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_varargslist435 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_varargslist437 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist439 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_varargslist457 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist459 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STAR_in_varargslist495 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist497 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_varargslist500 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_varargslist502 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist504 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_varargslist516 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_varargslist518 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fpdef_in_defparameter538 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_ASSIGN_in_defparameter541 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_defparameter543 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_fpdef564 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_fpdef571 = new BitSet(new long[]{0x0024000000000000L});
    public static final BitSet FOLLOW_fplist_in_fpdef573 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_RPAREN_in_fpdef575 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fpdef_in_fplist592 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_fplist602 = new BitSet(new long[]{0x0024000000000000L});
    public static final BitSet FOLLOW_fpdef_in_fplist604 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_fplist609 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_simple_stmt_in_stmt621 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_compound_stmt_in_stmt626 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_small_stmt_in_simple_stmt642 = new BitSet(new long[]{0x0040000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_SEMI_in_simple_stmt652 = new BitSet(new long[]{0x082E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_small_stmt_in_simple_stmt654 = new BitSet(new long[]{0x0040000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_SEMI_in_simple_stmt659 = new BitSet(new long[]{0x0040000000000000L});
    public static final BitSet FOLLOW_NEWLINE_in_simple_stmt663 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_stmt_in_small_stmt697 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_print_stmt_in_small_stmt702 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_del_stmt_in_small_stmt708 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_pass_stmt_in_small_stmt713 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_flow_stmt_in_small_stmt718 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_import_stmt_in_small_stmt723 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_global_stmt_in_small_stmt729 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exec_stmt_in_small_stmt734 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_assert_stmt_in_small_stmt739 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_testlist_in_expr_stmt752 = new BitSet(new long[]{0x14104000050010C2L,0x0000000000020142L});
    public static final BitSet FOLLOW_augassign_in_expr_stmt755 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_expr_stmt759 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ASSIGN_in_expr_stmt764 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_expr_stmt768 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_107_in_print_stmt888 = new BitSet(new long[]{0x082E0E0200020102L,0x0000018000001401L});
    public static final BitSet FOLLOW_testlist_in_print_stmt902 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RIGHTSHIFT_in_print_stmt916 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_print_stmt918 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_90_in_del_stmt938 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_exprlist_in_del_stmt940 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_106_in_pass_stmt949 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_break_stmt_in_flow_stmt958 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_continue_stmt_in_flow_stmt963 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_return_stmt_in_flow_stmt968 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_raise_stmt_in_flow_stmt974 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_yield_stmt_in_flow_stmt979 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_86_in_break_stmt988 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_88_in_continue_stmt997 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_109_in_return_stmt1006 = new BitSet(new long[]{0x082E0E0200020102L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_return_stmt1009 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_112_in_yield_stmt1033 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_yield_stmt1035 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_108_in_raise_stmt1044 = new BitSet(new long[]{0x082E0E0200020102L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_raise_stmt1047 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_raise_stmt1050 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_raise_stmt1052 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_raise_stmt1055 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_raise_stmt1057 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_100_in_import_stmt1079 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_dotted_as_name_in_import_stmt1083 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_import_stmt1086 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_dotted_as_name_in_import_stmt1090 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_97_in_import_stmt1120 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_dotted_name_in_import_stmt1122 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_100_in_import_stmt1124 = new BitSet(new long[]{0x0020000000000000L,0x0000000000000080L});
    public static final BitSet FOLLOW_STAR_in_import_stmt1135 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_import_as_name_in_import_stmt1139 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_import_stmt1142 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_import_as_name_in_import_stmt1144 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_NAME_in_import_as_name1163 = new BitSet(new long[]{0x0020000000000002L});
    public static final BitSet FOLLOW_NAME_in_import_as_name1166 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_import_as_name1168 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_dotted_name_in_dotted_as_name1179 = new BitSet(new long[]{0x0020000000000002L});
    public static final BitSet FOLLOW_NAME_in_dotted_as_name1182 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_dotted_as_name1184 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_dotted_name1195 = new BitSet(new long[]{0x0000000000400002L});
    public static final BitSet FOLLOW_DOT_in_dotted_name1198 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_dotted_name1200 = new BitSet(new long[]{0x0000000000400002L});
    public static final BitSet FOLLOW_98_in_global_stmt1211 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_global_stmt1213 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_global_stmt1216 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_global_stmt1218 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_94_in_exec_stmt1229 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_expr_in_exec_stmt1231 = new BitSet(new long[]{0x0000000000000002L,0x0000002000000000L});
    public static final BitSet FOLLOW_101_in_exec_stmt1234 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_exec_stmt1236 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_exec_stmt1239 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_exec_stmt1241 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_85_in_assert_stmt1254 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_assert_stmt1256 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_assert_stmt1259 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_assert_stmt1261 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_if_stmt_in_compound_stmt1273 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_while_stmt_in_compound_stmt1278 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_for_stmt_in_compound_stmt1283 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_try_stmt_in_compound_stmt1288 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_funcdef_in_compound_stmt1293 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_classdef_in_compound_stmt1298 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_99_in_if_stmt1307 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_if_stmt1311 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_if_stmt1313 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_if_stmt1317 = new BitSet(new long[]{0x0000000000000002L,0x0000000018000000L});
    public static final BitSet FOLLOW_91_in_if_stmt1320 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_if_stmt1324 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_if_stmt1326 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_if_stmt1330 = new BitSet(new long[]{0x0000000000000002L,0x0000000018000000L});
    public static final BitSet FOLLOW_92_in_if_stmt1335 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_if_stmt1337 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_if_stmt1341 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_111_in_while_stmt1387 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_while_stmt1389 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_while_stmt1391 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_while_stmt1393 = new BitSet(new long[]{0x0000000000000002L,0x0000000010000000L});
    public static final BitSet FOLLOW_92_in_while_stmt1396 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_while_stmt1398 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_while_stmt1400 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_96_in_for_stmt1432 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_exprlist_in_for_stmt1434 = new BitSet(new long[]{0x0000000000000000L,0x0000002000000000L});
    public static final BitSet FOLLOW_101_in_for_stmt1436 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_for_stmt1438 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_for_stmt1440 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_for_stmt1442 = new BitSet(new long[]{0x0000000000000002L,0x0000000010000000L});
    public static final BitSet FOLLOW_92_in_for_stmt1445 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_for_stmt1447 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_for_stmt1449 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_110_in_try_stmt1481 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_try_stmt1483 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_try_stmt1487 = new BitSet(new long[]{0x0000000000000000L,0x00000000A0000000L});
    public static final BitSet FOLLOW_except_clause_in_try_stmt1494 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_try_stmt1496 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_try_stmt1500 = new BitSet(new long[]{0x0000000000000002L,0x0000000030000000L});
    public static final BitSet FOLLOW_92_in_try_stmt1505 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_try_stmt1507 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_try_stmt1509 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_95_in_try_stmt1518 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_try_stmt1520 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_try_stmt1524 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_93_in_except_clause1569 = new BitSet(new long[]{0x082E0E0200020102L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_except_clause1574 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_except_clause1577 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_except_clause1581 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_simple_stmt_in_suite1614 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NEWLINE_in_suite1619 = new BitSet(new long[]{0x0000010000000000L});
    public static final BitSet FOLLOW_INDENT_in_suite1621 = new BitSet(new long[]{0x082E0E0200020100L,0x0001FD9F47E01400L});
    public static final BitSet FOLLOW_stmt_in_suite1624 = new BitSet(new long[]{0x082E0E0200120100L,0x0001FD9F47E01400L});
    public static final BitSet FOLLOW_DEDENT_in_suite1628 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_and_test_in_test1647 = new BitSet(new long[]{0x0000000000000002L,0x0000020000000000L});
    public static final BitSet FOLLOW_105_in_test1650 = new BitSet(new long[]{0x082E0E0200020100L,0x0000010000001400L});
    public static final BitSet FOLLOW_and_test_in_test1652 = new BitSet(new long[]{0x0000000000000002L,0x0000020000000000L});
    public static final BitSet FOLLOW_lambdef_in_test1659 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_not_test_in_and_test1670 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
    public static final BitSet FOLLOW_84_in_and_test1673 = new BitSet(new long[]{0x082E0E0200020100L,0x0000010000001400L});
    public static final BitSet FOLLOW_not_test_in_and_test1675 = new BitSet(new long[]{0x0000000000000002L,0x0000000000100000L});
    public static final BitSet FOLLOW_104_in_not_test1688 = new BitSet(new long[]{0x082E0E0200020100L,0x0000010000001400L});
    public static final BitSet FOLLOW_not_test_in_not_test1690 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_comparison_in_not_test1695 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_comparison1704 = new BitSet(new long[]{0x0081803008000012L,0x0000016000000000L});
    public static final BitSet FOLLOW_comp_op_in_comparison1707 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_expr_in_comparison1709 = new BitSet(new long[]{0x0081803008000012L,0x0000016000000000L});
    public static final BitSet FOLLOW_LESS_in_comp_op1720 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GREATER_in_comp_op1724 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_EQUAL_in_comp_op1728 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GREATEREQUAL_in_comp_op1732 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LESSEQUAL_in_comp_op1736 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ALT_NOTEQUAL_in_comp_op1740 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NOTEQUAL_in_comp_op1744 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_101_in_comp_op1748 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_104_in_comp_op1752 = new BitSet(new long[]{0x0000000000000000L,0x0000002000000000L});
    public static final BitSet FOLLOW_101_in_comp_op1754 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_102_in_comp_op1758 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_102_in_comp_op1762 = new BitSet(new long[]{0x0000000000000000L,0x0000010000000000L});
    public static final BitSet FOLLOW_104_in_comp_op1764 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_xor_expr_in_expr1773 = new BitSet(new long[]{0x0000000000000002L,0x0000000000010000L});
    public static final BitSet FOLLOW_VBAR_in_expr1776 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_xor_expr_in_expr1778 = new BitSet(new long[]{0x0000000000000002L,0x0000000000010000L});
    public static final BitSet FOLLOW_and_expr_in_xor_expr1789 = new BitSet(new long[]{0x0000000000000802L});
    public static final BitSet FOLLOW_CIRCUMFLEX_in_xor_expr1792 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_and_expr_in_xor_expr1794 = new BitSet(new long[]{0x0000000000000802L});
    public static final BitSet FOLLOW_shift_expr_in_and_expr1805 = new BitSet(new long[]{0x0000000000000022L});
    public static final BitSet FOLLOW_AMPER_in_and_expr1808 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_shift_expr_in_and_expr1810 = new BitSet(new long[]{0x0000000000000022L});
    public static final BitSet FOLLOW_arith_expr_in_shift_expr1821 = new BitSet(new long[]{0x0000200000000002L,0x0000000000000001L});
    public static final BitSet FOLLOW_set_in_shift_expr1824 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_arith_expr_in_shift_expr1830 = new BitSet(new long[]{0x0000200000000002L,0x0000000000000001L});
    public static final BitSet FOLLOW_term_in_arith_expr1841 = new BitSet(new long[]{0x0808000000000002L});
    public static final BitSet FOLLOW_set_in_arith_expr1844 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_term_in_arith_expr1850 = new BitSet(new long[]{0x0808000000000002L});
    public static final BitSet FOLLOW_factor_in_term1861 = new BitSet(new long[]{0x0200000000800002L,0x00000000000000A0L});
    public static final BitSet FOLLOW_set_in_term1864 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_factor_in_term1881 = new BitSet(new long[]{0x0200000000800002L,0x00000000000000A0L});
    public static final BitSet FOLLOW_set_in_factor1894 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_factor_in_factor1902 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_power_in_factor1907 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_atom_in_power1920 = new BitSet(new long[]{0x0004040002400002L});
    public static final BitSet FOLLOW_trailer_in_power1923 = new BitSet(new long[]{0x0004040002400002L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_power1935 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_factor_in_power1937 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_atom1948 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001404L});
    public static final BitSet FOLLOW_testlist_in_atom1951 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_RPAREN_in_atom1955 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LBRACK_in_atom1971 = new BitSet(new long[]{0x282E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_listmaker_in_atom1974 = new BitSet(new long[]{0x2000000000000000L});
    public static final BitSet FOLLOW_RBRACK_in_atom1978 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LCURLY_in_atom1983 = new BitSet(new long[]{0x482E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_dictmaker_in_atom1986 = new BitSet(new long[]{0x4000000000000000L});
    public static final BitSet FOLLOW_RCURLY_in_atom1990 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BACKQUOTE_in_atom1995 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_atom1997 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_BACKQUOTE_in_atom1999 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_atom2004 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INT_in_atom2017 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LONGINT_in_atom2025 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FLOAT_in_atom2033 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_COMPLEX_in_atom2041 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_in_atom2047 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000400L});
    public static final BitSet FOLLOW_test_in_listmaker2058 = new BitSet(new long[]{0x0000000000008002L,0x0000000100000000L});
    public static final BitSet FOLLOW_list_for_in_listmaker2062 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_listmaker2074 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_listmaker2076 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_listmaker2083 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_103_in_lambdef2094 = new BitSet(new long[]{0x0024000002004000L,0x0000000000000080L});
    public static final BitSet FOLLOW_varargslist_in_lambdef2097 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_lambdef2101 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_lambdef2103 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_trailer2112 = new BitSet(new long[]{0x082E0E0202020100L,0x0000018000001484L});
    public static final BitSet FOLLOW_arglist_in_trailer2115 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_RPAREN_in_trailer2119 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LBRACK_in_trailer2124 = new BitSet(new long[]{0x082E0E0200424100L,0x0000018000001400L});
    public static final BitSet FOLLOW_subscriptlist_in_trailer2126 = new BitSet(new long[]{0x2000000000000000L});
    public static final BitSet FOLLOW_RBRACK_in_trailer2128 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOT_in_trailer2133 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_trailer2135 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_subscript_in_subscriptlist2151 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_subscriptlist2161 = new BitSet(new long[]{0x082E0E0200424100L,0x0000018000001400L});
    public static final BitSet FOLLOW_subscript_in_subscriptlist2163 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_subscriptlist2168 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOT_in_subscript2181 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_DOT_in_subscript2183 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_DOT_in_subscript2185 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_test_in_subscript2193 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_COLON_in_subscript2196 = new BitSet(new long[]{0x082E0E0200024102L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_subscript2199 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_sliceop_in_subscript2204 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_COLON_in_subscript2216 = new BitSet(new long[]{0x082E0E0200024102L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_subscript2219 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_sliceop_in_subscript2224 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_COLON_in_sliceop2238 = new BitSet(new long[]{0x082E0E0200020102L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_sliceop2241 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_exprlist2259 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_exprlist2269 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_expr_in_exprlist2271 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_exprlist2276 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_test_in_testlist2296 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_testlist2309 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_testlist2313 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_testlist2318 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_test_in_dictmaker2346 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_dictmaker2348 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_dictmaker2350 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_dictmaker2368 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_dictmaker2370 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_dictmaker2372 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_dictmaker2374 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_dictmaker2379 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_87_in_classdef2393 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_NAME_in_classdef2395 = new BitSet(new long[]{0x0004000000004000L});
    public static final BitSet FOLLOW_LPAREN_in_classdef2398 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_classdef2400 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_RPAREN_in_classdef2402 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_COLON_in_classdef2406 = new BitSet(new long[]{0x086E0E0200020100L,0x00013D9645601400L});
    public static final BitSet FOLLOW_suite_in_classdef2408 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_argument_in_arglist2436 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_arglist2439 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_argument_in_arglist2441 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_arglist2455 = new BitSet(new long[]{0x0000000002000002L,0x0000000000000080L});
    public static final BitSet FOLLOW_STAR_in_arglist2469 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2471 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_arglist2474 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_arglist2476 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2478 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_arglist2494 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2496 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STAR_in_arglist2530 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2532 = new BitSet(new long[]{0x0000000000008002L});
    public static final BitSet FOLLOW_COMMA_in_arglist2535 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_arglist2537 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2539 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLESTAR_in_arglist2551 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_arglist2553 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_test_in_argument2566 = new BitSet(new long[]{0x0000000000000082L});
    public static final BitSet FOLLOW_ASSIGN_in_argument2569 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_argument2571 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_list_for_in_list_iter2590 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_list_if_in_list_iter2595 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_96_in_list_for2604 = new BitSet(new long[]{0x082E0E0200020100L,0x0000000000001400L});
    public static final BitSet FOLLOW_exprlist_in_list_for2606 = new BitSet(new long[]{0x0000000000000000L,0x0000002000000000L});
    public static final BitSet FOLLOW_101_in_list_for2608 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_testlist_in_list_for2610 = new BitSet(new long[]{0x0000000000000002L,0x0000000900000000L});
    public static final BitSet FOLLOW_list_iter_in_list_for2613 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_99_in_list_if2624 = new BitSet(new long[]{0x082E0E0200020100L,0x0000018000001400L});
    public static final BitSet FOLLOW_test_in_list_if2626 = new BitSet(new long[]{0x0000000000000002L,0x0000000900000000L});
    public static final BitSet FOLLOW_list_iter_in_list_if2629 = new BitSet(new long[]{0x0000000000000002L});

}